You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I noticed this when I ran into problems with the setValue(items) API method.
If I select an item and then use setValue to select a different item, the originally selected item does not appear as an option even though it should no longer be selected. Or if I select all items and then setValue([]), there are no options to choose.
setValue calls clear() which should be resetting the selected state of options in the option list, but this isn't happening. As a result, you get an option list that shrinks until something else forces it to rebuild.
I've found that I can work around this problem by calling refreshItems() after calling setValue, but this really shouldn't be necessary. Here's a demo of the problem in action.
* upstream/master: (69 commits)
Released 0.11.0.
Added "allowEmptyOption" option (selectize#163).
Fixed broken bootstrap3 build.
Fixing confusing description
renamed the undefined plugins variable to selector_plugins
Released 0.10.1.
Bind createFilter callback to Selectize instance.
Released 0.10.0.
Calculate scrollbar width (fixesselectize#360).
Fix for selectize#438 + tests.
Added createFilter sample to contacts demo.
Cherry picked commit 6e04d7b from selectize#370.
Minor cleanup of selectize#405.
Forgot self qualifier on
Jquery cached data allocated by selectized is now cleaned up at destroy time
Removing extra tabs
selectized class should not have been added before the classes were checked and propegated to all of the controls created by selectize. It was previously added after this initialization and is now also added at the same time.
Used method call to isFull to avoid duplicate code
Consolidated the refreshState call to capture just becoming full during bulk (or any) addItem call
Delaying updating attributes and caret during bulk insertion
...
Conflicts:
src/selectize.js
I noticed this when I ran into problems with the setValue(items) API method.
If I select an item and then use setValue to select a different item, the originally selected item does not appear as an option even though it should no longer be selected. Or if I select all items and then setValue([]), there are no options to choose.
setValue calls clear() which should be resetting the selected state of options in the option list, but this isn't happening. As a result, you get an option list that shrinks until something else forces it to rebuild.
I've found that I can work around this problem by calling refreshItems() after calling setValue, but this really shouldn't be necessary. Here's a demo of the problem in action.
http://plnkr.co/edit/iZhwwd6COtecyA8ZMJsi?p=preview
The text was updated successfully, but these errors were encountered: