index.js
17 lines
| 1 | import AdvancedSelect from '../advanced-select'; |
| 2 | |
| 3 | function SimpleMultiSelect( props ) { |
| 4 | const { options, value } = props; |
| 5 | |
| 6 | return ( |
| 7 | <AdvancedSelect |
| 8 | { ...props } |
| 9 | isMulti |
| 10 | id={ 'gblocks-simple-multi-select' } |
| 11 | value={ options.filter( ( option ) => ( value.includes( option.value ) ) ) } |
| 12 | /> |
| 13 | ); |
| 14 | } |
| 15 | |
| 16 | export default SimpleMultiSelect; |
| 17 |