File tree Expand file tree Collapse file tree 3 files changed +14
-1
lines changed
packages/pf4-component-mapper/src/select Expand file tree Collapse file tree 3 files changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ const Select = (props) => {
19
19
id = { id || input . name }
20
20
FormGroupProps = { FormGroupProps }
21
21
>
22
- < DataDrivenSelect { ...input } { ...rest } isDisabled = { isDisabled || isReadOnly } />
22
+ < DataDrivenSelect { ...input } { ...rest } isDisabled = { isDisabled || isReadOnly } useFlatOptions />
23
23
</ FormGroup >
24
24
) ;
25
25
} ;
Original file line number Diff line number Diff line change @@ -131,6 +131,18 @@ const Menu = ({
131
131
/>
132
132
) }
133
133
{ filteredOptions . map ( ( item , index ) => {
134
+ if ( item . group ) {
135
+ return (
136
+ < div className = "pf-c-select__menu-group" key = { `group-${ index } ` } >
137
+ < div className = "pf-c-select__menu-group-title" > { item . group } </ div >
138
+ </ div >
139
+ ) ;
140
+ }
141
+
142
+ if ( item . divider ) {
143
+ return < hr className = "pf-c-divider" key = { `divider-${ index } ` } /> ;
144
+ }
145
+
134
146
const itemProps = getItemProps ( {
135
147
item,
136
148
index,
Original file line number Diff line number Diff line change @@ -238,6 +238,7 @@ InternalSelect.propTypes = {
238
238
PropTypes . shape ( {
239
239
value : PropTypes . any ,
240
240
label : PropTypes . any ,
241
+ divider : PropTypes . bool ,
241
242
} )
242
243
) . isRequired ,
243
244
value : PropTypes . any ,
You can’t perform that action at this time.
0 commit comments