React Multiselect Component with IE11 support
npm install bapmrl-react-multiselect-iebapmrl-react-multiselect is a javascript library that provides a filterable
string
element when all items are selected.
object
arrow, checkbox, group, input, items, itemHover, itemSelect,
label, multiselect, multiselectDisabled, multiselectFocus,
multiselectOpen, option
bool
bool
value of the input element.
object
element.
object or array
group or an array of type
option.
group has the following shape:
javascript
PropTypes.shape({
key: PropTypes.string.isRequired,
label: PropTypes.string.isRequired,
options: PropTypes.arrayOf(
PropTypes.shape({
key: PropTypes.string.isRequired,
label: PropTypes.string.isRequired,
selected: PropTypes.bool.isRequired
})
).isRequired
})
`
Type option has the following shape:
`javascript
PropTypes.shape({
key: PropTypes.string.isRequired,
label: PropTypes.string.isRequired,
selected: PropTypes.bool.isRequired
})
`
#### props.onItemSelected
Type: func
Event handler triggered whenever a group or option is selected.
Event shape:
| Type of props.items / Action | Select group | Select option |
|--------------------------------|:--------------------------:|:---------------------------------:|
| object | { items, key, selected } | { items, key, index, selected } |
| array | | { items, index, selected } |
where items is the latest props.items used for rendering the component and
selected is the item's new selected state.
Use this callback to create new props.items` and make the component rerender.