react-select-plus
react-select-plus copied to clipboard
How do we use option groups?
This is just a documentation issue.
I've been experimenting with react-select-plus, and it looks like it does exactly what I need. However, it's unclear to me how to use the "option groups" feature. You have an example of option groups on your Demos page, but I cannot find anything in your documentation/README on how to use it.
Not an urgent issue, just would like to understand how to take advantage of that feature. Thanks!
It's all about you you structure your data. It's pretty easy to use. Here's an example (using ES6) with the ability to create multiple values, and new values. These it just props.
I've put my example in a codesandbox for your ease.
https://codesandbox.io/s/483orJ5Wk
The example source code is easy to find in the repo as well!
https://github.com/HubSpot/react-select-plus/blob/master/examples/src/components/GroupedOptionsField.js