UNPKG

phoenix-components-library

Version:

Component library for Phoenix Frontend Projects.

61 lines (46 loc) 1.19 kB
# MultiSelect ### Usage ```js import { MultiSelect } from 'phoenix-components-library'; render() { return ( <MultiSelect options=[] defaultOptions=[] placeholder="placeholder" onOptionSelect={this.onOptionSelect} disabled /> ); } ``` ### Live Example <!-- STORY --> ### Properties - `options` - Options to show in Multiselect - `defaultOptions` - Fill Multiselect with selected options - `placeholder` - Multiselect placeholder - `onOptionSelect` - Multiselect click callback function - `disabled` - Disable multiselect | propName | propType | defaultValue | isRequired | | -------------- | -------- | ------------ | ---------- | | options | array | - | + | | defaultOptions | array | - | | | placeholder | string | - | | | onOptionSelect | func | - | | | disabled | bool | false | | #### Proptype Shape `options` ```js PropTypes.arrayOf({ name: PropTypes.string, value: PropTypes.string }); ``` `default` ```js PropTypes.arrayOf({ value: PropTypes.string.isRequired }); ``` ### Roadmap