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) => {
1919 id = { id || input . name }
2020 FormGroupProps = { FormGroupProps }
2121 >
22- < DataDrivenSelect { ...input } { ...rest } isDisabled = { isDisabled || isReadOnly } />
22+ < DataDrivenSelect { ...input } { ...rest } isDisabled = { isDisabled || isReadOnly } useFlatOptions />
2323 </ FormGroup >
2424 ) ;
2525} ;
Original file line number Diff line number Diff line change @@ -131,6 +131,18 @@ const Menu = ({
131131 />
132132 ) }
133133 { 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+
134146 const itemProps = getItemProps ( {
135147 item,
136148 index,
Original file line number Diff line number Diff line change @@ -238,6 +238,7 @@ InternalSelect.propTypes = {
238238 PropTypes . shape ( {
239239 value : PropTypes . any ,
240240 label : PropTypes . any ,
241+ divider : PropTypes . bool ,
241242 } )
242243 ) . isRequired ,
243244 value : PropTypes . any ,
You can’t perform that action at this time.
0 commit comments