-
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
removeSelected prop (round 2), for optionally keeping selected values in dropdown #1891
Conversation
… the same structure/order as 'options'
Hi @banderson thank you for this. Since this adds a new prop this will need unit tests and documentation. Can you add these? |
@agirton I just updated this to include:
The original author (@dherran) already added docs to the example site. I tried to follow the testing style that was there, let me know if there's anything else I can do to help get this in! /cc @TrevorBurnham |
README.md
Outdated
@@ -104,7 +104,7 @@ The built-in Options renderer also support custom classNames, just add a `classN | |||
|
|||
You can enable multi-value selection by setting `multi={true}`. In this mode: | |||
|
|||
* Selected options will be removed from the dropdown menu | |||
* Selected options will be removed from the dropdown menu by default. If you want them to remain in the list, set `removeSelected={true}` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@banderson just a minor nit: should this be "If you want them to remain in the list, set removeSelected={false}
"?
Is there anything currently blocking this (besides the true -> false change in the docs)? We could really need this aswell and I'd be happy to help with any remaining steps so this PR can be merged :) |
Two test cases were broken btw, fixed them here: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good to go @JedWatson
Thanks everyone! This is good to land 👍 |
I forked what @dherran did with #882 to resolve conflicts with master and to implement PR feedback from @agirton, so defer to #882 and the original issue for more details: #803
This is in a holding state until we decide what to do here. But this should work as expected, and all tests are passing.