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

The onSelectAll event is firing even if the user manually selects all options #62

Open
dustinaleksiuk opened this issue Jan 6, 2017 · 3 comments

Comments

@dustinaleksiuk
Copy link

In the original control that I believe this one is based on, the documentation says that onSelectAll won't be fired if the user selects all options manually. Only if the user clicks the "All" checkbox.

http://davidstutz.github.io/bootstrap-multiselect/#configuration-options-onSelectAll

In this control, the event does fire. This makes it really hard to manage the select all event, because when I populate the control with selected values on load, it fires the event, making react rerender and repopulate the values (causing an infinite loop).

I might be doing something wrong, but it was noteworthy to me that the davidstutz version apparently behaves differently.

This control is awesome. Thanks for making it.

@skratchdot
Copy link
Owner

Thank you for the details! I haven't done anything w/ this repo in a while, so I'm hoping to find some time soon to clean up some of the code, write some tests, and look into bugs like this. The infinite loop sounds very bad, so I want to prevent anything like that from happening.

@vped
Copy link

vped commented Sep 14, 2017

@skratchdot it seems this issue yet not fixed. If you already working on this issue please let me know. I am thinking to work on this issue.

@skratchdot
Copy link
Owner

@vped - I have not worked on it, and will probably not have time to. Please feel free to work on a fix. Keep in mind, the fix needs to go in https://github.com/skratchdot/react-bootstrap-multiselect/blob/master/lib/index.js (not one of the /lib/bootstrap* which are auto-generated / pulled from the upstream library).

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

3 participants