File tree Expand file tree Collapse file tree 3 files changed +22
-1
lines changed
packages/pf3-component-mapper Expand file tree Collapse file tree 3 files changed +22
-1
lines changed Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ const selectSchema = {
15
15
component : 'select-field' ,
16
16
name : 'select-single' ,
17
17
label : 'Select single' ,
18
+ isDisabled : true ,
18
19
options : [ {
19
20
label : 'foo' ,
20
21
value : 123
@@ -28,6 +29,7 @@ const selectSchema = {
28
29
label : 'Select search' ,
29
30
isRequired : true ,
30
31
validateOnMount : true ,
32
+ isDisabled : true ,
31
33
isClearable : true ,
32
34
multi : true ,
33
35
isSearchable : true ,
Original file line number Diff line number Diff line change @@ -287,6 +287,8 @@ export class P3Select extends Component {
287
287
< div className = { `${ props . classNamePrefix } -button` } >
288
288
< DropdownButton
289
289
onToggle = { ( ) => this . handleToggleOpen ( ) }
290
+ disabled = { props . isDisabled }
291
+ noCaret = { props . isDisabled }
290
292
open = { isOpen }
291
293
id = { props . id || props . input . name }
292
294
title = { < SelectTitle
@@ -336,7 +338,7 @@ export class P3Select extends Component {
336
338
components = { {
337
339
ClearIndicator,
338
340
Option,
339
- DropdownIndicator,
341
+ DropdownIndicator : props . isDisabled ? null : DropdownIndicator ,
340
342
} }
341
343
/>
342
344
) ;
Original file line number Diff line number Diff line change @@ -199,6 +199,23 @@ div.field-group {
199
199
}
200
200
}
201
201
}
202
+ & .ddorg__pf3-component-mapper__select--is-disabled {
203
+ cursor : not-allowed ;
204
+ pointer-events : unset ;
205
+ border-color : #d1d1d1 ;
206
+ * {
207
+ pointer-events : none ;
208
+ cursor : not-allowed ;
209
+ }
210
+ .ddorg__pf3-component-mapper__select__control {
211
+ background-color : #fafafa ;
212
+ background-image : none ;
213
+ border-color : #d1d1d1 ;
214
+ color : #8b8d8f ;
215
+ opacity : 1 ;
216
+ box-shadow : none ;
217
+ }
218
+ }
202
219
}
203
220
.ddorg__pf3-component-mapper__select-dropdown {
204
221
& .is-empty {
You can’t perform that action at this time.
0 commit comments