1.0.0 ⢠Published 4 years ago
@ahrefs/bs-react-select v1.0.0
Reason bindings for react-select
Reason bindings for react-select.
Status
š§ Not everything is supported yet; Unstable; Doesn't follow semver; š§
Feel free to create an issue or PR.
Installation, npm
npm install --save @ahrefs/bs-react-selectThen add @ahrefs/bs-react-select to bs-dependencies in your bsconfig.json:
{
...
"bs-dependencies": ["@ahrefs/bs-react-select"]
}To include styles
[%bs.raw {|require('react-select/dist/react-select.css')|}];TODO
aria-describedby/aria-label/aria-labelledbySpecialCreationFunction doesn't allow to change prop name, hopefully this will be possible in the next bucklescript releases- Annotate Async props
- Annotate Creatable props
- Can we reduce boilerplate in
Select.reandSelectMulti.re? - Upgrade to react-select version 2
resetValue/value- string | 'a OR string | array('a)filterOptions- bool | func- Separate SelectMulti
Usage
Please take a look at examples. To run demo:
$ cd examples
$ npm install
$ npm startSelect vs SelectMulti
- Option.arg -
ValvsArr - onChange -
option('a)vsarray('a) - onValueClick -
'avsarray('a) - filterOptions - one extra argument
~current: array('a)