0.1.1 • Published 8 years ago
@softledger/sl-select v0.1.1
SLSelect
From src/SLSelect.jsx
Base select component with standard fetch function
| prop | type | default | required | description |
|---|---|---|---|---|
| errorText | Union<String \| Array> | :x: | Error text to show when form is invalid | |
| fetchData | Function | :white_check_mark: | callback which should fetch options must return a promise | |
| labelField | String | 'name' | :x: | options key which stores the label |
| multi | Boolean | :x: | Set true to enable multi-select | |
| mutli | Unknown | false | :x: | |
| onChange | Function | :white_check_mark: | callback when value is changed | |
| optionRenderer | Function | :x: | function which returns JSX to display an option ex: option => {option.label} | |
| value | * | :x: | Current value to display | |
| valueField | String | '_id' | :x: | options key which stores value |