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

if I don't want to filter options while in multi mode #1847

Closed
kcliu opened this issue Jul 1, 2017 · 9 comments
Closed

if I don't want to filter options while in multi mode #1847

kcliu opened this issue Jul 1, 2017 · 9 comments

Comments

@kcliu
Copy link
Contributor

kcliu commented Jul 1, 2017

Instead of filter options in 'multi' mode, if we have to rewrite filterOptions, we may also want to do something to the selected options ((e.g apply a style, remove option if click again). Therefore, pass valueArray and removeValue() to menuRenderer would be needed.

@agirton
Copy link
Collaborator

agirton commented Jul 1, 2017

Hi @kcliu can you give us a bit more information? Are you proposing a feature?

@kcliu
Copy link
Contributor Author

kcliu commented Jul 1, 2017

yes, I think it's more like a feature/enhancement, just like what pr #1731 did, to add more flexibility for the options. when we use multiselect mode, we may not always want to filter the selected options. Therefore, making menuRenderer more flexible would be a good direction.

Below is the example that I want to leverage menuRenderer to acheive. But actually I can't do it because the lack of valueArray and removeValue() in menuRenderer.
screen shot 2017-07-01 at 10 34 52 pm

@newswim
Copy link

newswim commented Jul 1, 2017

This seems like a pretty obvious enhancement. I have an identical mock-up that I'm trying to recreate.

@agirton
Copy link
Collaborator

agirton commented Jul 2, 2017

Hi @kcliu i see. But this doesn’t look like a select component you are looking for a menu component, right?

@kcliu
Copy link
Contributor Author

kcliu commented Jul 2, 2017

@agirton Nope, the mock-up is just for demonstration.

@rrgrs
Copy link

rrgrs commented Jul 3, 2017

+1

I too am interested in being able to render the menu in the way described by @kcliu kcliu as it's much more mobile friendly.

@newswim
Copy link

newswim commented Jul 10, 2017

Is seems like this PR might fix this, and it's only a tiny change to pass along the valueArray.

@agirton
Copy link
Collaborator

agirton commented Jul 10, 2017

Hi @newswim my concern is some people may be expecting this old behavior, so it's best to wait till after 1.0 is released.

@JedWatson
Copy link
Owner

I've stepped through the code and this should be safe (not make a difference) because the function signature remains the same, and by default selected options aren't being passed to the menuRenderer anyway. So I've merged that PR, which (in combination with the new removeOnSelect prop in PR #1891) will let you do what you're after.

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

5 participants