@@ -28,7 +28,6 @@ const style = { margin: 10 };
28
28
29
29
< div>
30
30
< Select
31
- id= " button-select-one"
32
31
name= " select-example"
33
32
options= {options}
34
33
placeholder= " Select your language"
@@ -42,6 +41,41 @@ const style = { margin: 10 };
42
41
< / div> ;
43
42
```
44
43
44
+ ### Disable rows
45
+
46
+ Use the ` disabled ` object property to disable a row in a dropdown and prevent onClick actions from happening.
47
+
48
+ ``` jsx
49
+ const options = [
50
+ { value: ' en' , label: ' English' },
51
+ { value: ' ru' , label: ' русский' },
52
+ { value: ' zh' , label: ' 中文' },
53
+ { value: ' sq' , label: ' Albanian' },
54
+ { value: ' ar' , label: ' Arabic' },
55
+ { value: ' eu' , label: ' Basque' , disabled: true },
56
+ { value: ' bn' , label: ' Bengali' , disabled: true },
57
+ { value: ' bs' , label: ' Bosnian' , disabled: true },
58
+ { value: ' bg' , label: ' Bulgarian' , disabled: true },
59
+ { value: ' ca' , label: ' Catalan' , disabled: true },
60
+ ];
61
+
62
+ const style = { margin: 10 };
63
+
64
+ < div>
65
+ < Select
66
+ name= " disabled-select-example"
67
+ options= {options}
68
+ placeholder= " Select your language"
69
+ style= {style}
70
+ value= {state .value1 }
71
+ onChange= {value1 => {
72
+ console .log (' New Value:' , value1);
73
+ setState ({ value1 });
74
+ }}
75
+ / >
76
+ < / div> ;
77
+ ```
78
+
45
79
## Variations
46
80
47
81
### Autocomplete
@@ -65,8 +99,7 @@ const style = { margin: 10 };
65
99
66
100
< div>
67
101
< Select
68
- id= " button-select-one"
69
- name= " select-example-one"
102
+ name= " autocomplete-example"
70
103
options= {options}
71
104
placeholder= " Select your fruit"
72
105
style= {style}
@@ -109,8 +142,7 @@ const style = { margin: 10 };
109
142
110
143
< div>
111
144
< Select
112
- id= " button-select-one"
113
- name= " select-example-one"
145
+ name= " multi-select-example"
114
146
options= {options}
115
147
placeholder= " Select your language"
116
148
style= {style}
@@ -152,8 +184,7 @@ const style = { margin: 10 };
152
184
153
185
< div>
154
186
< Select
155
- id= " button-select-one"
156
- name= " select-example-one"
187
+ name= " multi-select-immediate-example"
157
188
options= {options}
158
189
placeholder= " Select your language"
159
190
style= {style}
0 commit comments