Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How do we use option groups? #66

Open
zaweb opened this issue May 6, 2017 · 2 comments
Open

How do we use option groups? #66

zaweb opened this issue May 6, 2017 · 2 comments

Comments

@zaweb
Copy link

zaweb commented May 6, 2017

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!

@yarnball
Copy link

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

@danielpowell4
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants