bs-react-selectdeprecated

Reason bindings for react-select

Usage no npm install needed!

<script type="module">
  import bsReactSelect from 'https://cdn.skypack.dev/bs-react-select';
</script>

README

Reason bindings for react-select

Reason bindings for react-select.

Status

🚧 Not everything is supported yet. 🚧

Feel free to create an issue or PR.

Installation

npm install --save bs-react-select

Then add bs-react-select to bs-dependencies in your bsconfig.json:

{
  ...
  "bs-dependencies": ["bs-react-select"]
}

To include styles

[%bs.raw {|require('react-select/dist/react-select.css')|}];

TODO

  • aria-describedby / aria-label / aria-labelledby SpecialCreationFunction 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.re and SelectMulti.re?
  • 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 start

Select vs SelectMulti

  • Option.arg - Val vs Arr
  • onChange - option('a) vs array('a)
  • onValueClick - 'a vs array('a)
  • filterOptions - one extra argument ~current: array('a)