This repository was archived by the owner on Oct 2, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
onSelect callback is executed when limit is reached in multiple mode #1794
Comments
What do you believe is the best way to fix this. Just a check on the limit but then the items in the list are still clickable? Or disable all the items? |
I think that also the items should be disabled. You have reached the limit and you are not allowed to select any more, so it makes sense to disable them. What do you think @Jefiozie? |
What is the status of this case? |
Sorry didn't have a lot of time. I agree on the disabled state when you are on the defined limit. Maybe you can make a PR? Happy to review! |
kboga
pushed a commit
to kboga/ui-select
that referenced
this issue
Nov 29, 2016
…eached Previously if a limit was defined for a multiple selection ui-select and that limit was reached, the onSelectCallback would still be fired even though the item wasn't actually selected. This commit moves the firing of the callback to after the select has actually taken place to ensure it is only fired on the correct occassions. Fixes angular-ui#1794 Closes angular-ui#1836
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Uh oh!
There was an error while loading. Please reload this page.
Bug description:
The
onSelect
callback is executed whenlimit
is reached for multiple select. That shouldn't be the case because nothing is actually selected.Link to minimally-working plunker that reproduces the issue:
Example
Version of Angular, UI-Select, and Bootstrap/Select2/Selectize CSS
Angular: 1.5.8
UI-Select: 0.19.4
The text was updated successfully, but these errors were encountered: