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

Is there a way to setState during, before or after selectionsRenderer()? #112

Open
jwmann opened this issue Dec 1, 2017 · 2 comments
Open

Comments

@jwmann
Copy link
Contributor

jwmann commented Dec 1, 2017

A bug I've been getting that's been finding it's way into a bunch of other edge-cases is the fact that the state values is only set after the menu closes.

A perfectly example of this bug can be reproduced in demo 3 if you position the menu underneath the inputs, this reveals the chips, a much nicer experience UX-wise.

If during the selection phase, i.e. the menu is open, chips are being rendered with 'X's that allow you to remove them. However, this function relies on the state to already have them in it, so if you click the 'X' before you've closed the menu, you'll lost all your selections.

If there was a way to set the state during the click, it would not only be more efficient but would solve a bunch of other edge-cases.

@jwmann
Copy link
Contributor Author

jwmann commented Dec 1, 2017

I basically need a way to do what handleMenuSelection() does.

@Sharlaan
Copy link
Owner

Sharlaan commented Jan 2, 2018

The new prop onSelect might solve your issue : please tell me how it goes with v1.8.4 ^^

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

2 participants