File tree Expand file tree Collapse file tree 3 files changed +12
-4
lines changed
packages/website/src/components Expand file tree Collapse file tree 3 files changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -90,10 +90,9 @@ function OptionsSelectorContent({
90
90
name = "ts"
91
91
className = "text--right"
92
92
value = { state . ts }
93
+ disabled = { ! tsVersions . length }
93
94
onChange = { updateTS }
94
- options = { ( ( tsVersions . length && tsVersions ) || [ state . ts ] ) . filter (
95
- item => parseFloat ( item ) >= 3.3 ,
96
- ) }
95
+ options = { ( tsVersions . length && tsVersions ) || [ state . ts ] }
97
96
/>
98
97
</ label >
99
98
< label className = { styles . optionLabel } >
Original file line number Diff line number Diff line change @@ -110,7 +110,14 @@ export const useSandboxServices = (
110
110
111
111
const webLinter = new WebLinter ( system , compilerOptions , lintUtils ) ;
112
112
113
- props . onLoaded ( webLinter . ruleNames , sandboxInstance . supportedVersions ) ;
113
+ props . onLoaded (
114
+ webLinter . ruleNames ,
115
+ Array . from (
116
+ new Set ( [ ...sandboxInstance . supportedVersions , window . ts . version ] ) ,
117
+ )
118
+ . filter ( item => parseFloat ( item ) >= 3.3 )
119
+ . sort ( ( a , b ) => b . localeCompare ( a ) ) ,
120
+ ) ;
114
121
115
122
setServices ( {
116
123
main,
Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ export interface DropdownProps<T> {
13
13
readonly value : T | undefined ;
14
14
readonly name : string ;
15
15
readonly className ?: string ;
16
+ readonly disabled ?: boolean ;
16
17
}
17
18
18
19
function Dropdown < T extends boolean | string | number > (
@@ -27,6 +28,7 @@ function Dropdown<T extends boolean | string | number>(
27
28
return (
28
29
< select
29
30
name = { props . name }
31
+ disabled = { props . disabled }
30
32
value = { String ( props . value ) }
31
33
className = { clsx ( styles . optionSelect , props . className ) }
32
34
onChange = { ( e ) : void => {
You can’t perform that action at this time.
0 commit comments