0.1.1 • Published 7 years ago

@softledger/sl-select v0.1.1

Weekly downloads
2
License
MIT
Repository
-
Last release
7 years ago

SLSelect

From src/SLSelect.jsx

Base select component with standard fetch function

proptypedefaultrequireddescription
errorTextUnion<String \| Array>:x:Error text to show when form is invalid
fetchDataFunction:white_check_mark:callback which should fetch options must return a promise
labelFieldString'name':x:options key which stores the label
multiBoolean:x:Set true to enable multi-select
mutliUnknownfalse:x:
onChangeFunction:white_check_mark:callback when value is changed
optionRendererFunction:x:function which returns JSX to display an option ex: option => {option.label}
value*:x:Current value to display
valueFieldString'_id':x:options key which stores value