-
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
Categorized options feature #2335
Comments
Hi @yanshiyason, thanks for creating this issue - it's great to see what you've been able to do with react-select. Not sure if you've seen but I've been working on a new architecture for v2 which would make this much easier to implement, so I don't think it's likely we'll extend v1 to support this more cleanly but I would be very interested in your feedback on v2 and whether it makes this case better for you. The API is still undergoing a lot of change so whatever you do with it in the next week or so should be considered experimental, but I'm hoping to finalise it and make the first production release by the end of February. See #2289, and especially check out the "Experimental" examples. |
Hi @JedWatson , thank you for taking the time to look into this! I took a look at v2 and I tried implementing a first rough version. Here is the PR #2341. Also, I couldn't find the API for keeping the menu opened when selecting options.. is that yet to be implemented in v2? Thanks! |
I forgot to upload a screenshot, will do so tomorrow! |
@yanshiyason no need, a preview build was automatically generated for your PR so I can see what you've done: https://deploy-preview-2341--react-select.netlify.com 😄 Taking a look through the code now, will leave some notes for you! Thanks for trying out v2 |
The prop you're after is |
Hey @yanshiyason v1 of react-select is no longer maintained. We recommend maintaining your own v1 fork if you want to address We highly recommend upgrading from v1 to v2. This issue is already be fixed and non-existent in v2. I'm closing this issue/PR now. Feel free add your thoughts in #3981 and reference this issue/PR if needed. |
Hi, thank you for this library. It has been a pleasure to work with so far!
I would like to propose a feature.
I am working on an app where the options are categorized (nested) like so:
When toggling the parent, all children toggle along with it.
I am accomplishing this by using the setValue method defined on the
Select
element. I pass aref
from theSelect
component to a customMenu
component rendered through themenuRenderer
prop which in turn passes it down to the "category's parent option" which finally uses it to toggle it's children. I thought it would be nice to offer a user friendly way of accomplishing this functionality.There is a working demo of a jQuery library which accomplishes this here. Look at the
multi / group
one.Please let me know if you would be interested in this feature and I can open an initial PR.
The text was updated successfully, but these errors were encountered: