-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
[Dropdown] - Add "set exactly" behavior #2689
Comments
However |
Ok, I would also recommend updating the description of "set selected" in the docs because the description would lead devs to believe it overwrites any previous value. |
I can easily add |
Yes, that would be a great solution. Much appreciated. |
I'm also seeing a related bug when using |
This is actually really fascinating, setting a multi value to |
Hi, I think there's a bug in 'set exactly' - the selected labels are not in the same order of passed array. i.e. $dropdown.dropdown('set exactly', ['d', 'a','c', 'b']); |
Expected
The Dropdown should remove existing selected values in the dropdown and replace them with the new ones.
Result
The Dropdown does not set the selected options and appends the newly selected values to the current selection.
Testcase
https://jsfiddle.net/gaa545jc/8/
Notes
Calling "clear" prior to calling "set selected" works as a temporary solution. However, there seems to be some weird effects on "get value" after calling "clear" and "set selected"
The text was updated successfully, but these errors were encountered: