Sorry, but you either have no stories or none are selected somehow.
If the problem persists, check the browser console, or the terminal you've run Storybook from.
The <MultiSelect>
component can be used when you need a select component to support multiple options simultaneously.
The state of the multi-select is handled by the parent component. An onChange
prop handler is provided that will be called with the updated list of options whenever there's a change.
Multi-select also supports nested options See Nested Options. When a parent option is selected, all children will be selected. If all children are selected, the parent will be selected too.
NOTE: This is a controlled component, so don't forget to pass the updated props to MultiSelect
to see the changes. See Example
Options determine the construction of the multi-select menu. It takes an Array
of Objects
with the following shape:
UlStyle gives you the option to set a special style specifically to your options list:
UlStyle gives you the option to set a special style specifically to your options list:
Here's an example of a possible set of options:
You may also have nested options. Here's an example:
Name | Description | Default |
---|---|---|
options* | - | |
callback | func | - |
onChange | func | () => {} |
placeholder | string | '' |
size | 'xs''sm''' | - |
className | string | '' |
ulStyle | object | { } |