@ahrefs/bs-react-select

1.0.0 • Public • Published

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-select

Then 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-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?
  • [ ] Upgrade to react-select version 2
  • [x] resetValue / value - string | 'a OR string | array('a)
  • [x] filterOptions - bool | func
  • [x] 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)

/@ahrefs/bs-react-select/

    Package Sidebar

    Install

    npm i @ahrefs/bs-react-select

    Weekly Downloads

    12

    Version

    1.0.0

    License

    MIT

    Unpacked Size

    20.3 kB

    Total Files

    9

    Last publish

    Collaborators

    • khady
    • rustykey
    • germes
    • bryanthomaschen
    • denstr
    • jchavarri
    • zindel
    • feihong
    • jkvt2