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

Reset previous selection when repeating calls to multi-select #276

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

starsway
Copy link

@starsway starsway commented Jul 7, 2017

When multi-select is called several times on the same 'select' HTML
element (e.g. when this 'select' element is updated with fresh data
from a database each time it is displayed), it is necessary to
reset previous selections (if any) before processing current
selected / unselected items, otherwise items that were previously in the class
'ms-selected' will remain in this class, and will therefore be
(wrongly) displayed as selected.

When multi-select is called several times on the same 'select' HTML
element (e.g. when this 'select' element is updated with fresh data
from a database each time it is displayed), it is necessary to
reset previous selections (if any) before processing current
selected / unselected items, otherwise items that were in the class
'ms-selected' will remain in this class, and will therefore be
(wrongly) displayed as selected.
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

Successfully merging this pull request may close these issues.

1 participant