-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
[V2] How to get the group label in onChange #2417
Comments
The entire data structure for the selected option is passed to the i.e const options = [
{ label: 'Group A', options: [
{ value: 'first', label: 'First', group: 'Group A' }
] },
{ label: 'Group B', options: [
{ value: 'second', label: 'Second', group: 'Group B' }
] }
];
<Select options={options} ... /> You could easily generate this at run-time... It adds a small amount of pre-processing to your options but I'm trying to keep the core feature set of v2 limited to things you can't easily do with the extension API. |
@JedWatson thank you very much! |
@JedWatson Is it possible to select an entire group? |
Any options for styling group labels?
Id like the group labels to be bigger |
v2 is really great. One question ... How to get group label/object for selected option? for example in onChange method.
Thanks #59
The text was updated successfully, but these errors were encountered: