-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Closed
Labels
Description
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.