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 don't have the docs open right now but I'm fairly certain these are both documented. The id must be a string and anything else is considered unsupported. There are examples for how to remap and convert keys within Select2 for cases where the API is not right.
I don't have the docs open right now but I'm fairly certain these are both documented. The id must be a string and anything else is considered unsupported. There are examples for how to remap and convert keys within Select2 for cases where the API is not right.
Even if it's documented in the docs (it's not; there are several issues where the "id must be a string" is supposed to be taken care of by the library, see #4227 (comment), #6128 and so on), the point is that one random feature of the library (unselecting) shouldn't break silently. It's very hard to track down why one box suddenly just had a feature stopped working, only to find out that on that day a data source returned a wrong item.
I also don't see why the workaround I'm using in jsbin couldn't be made the default behavior of the library.
Bug
For problematic ajax sources, Select2 cannot unselect options, no errors given in the console.
Expected
Select2 should be able to unselect options
OR
Select2 should throw an error that an entry is problematic.
Replicate
Causes
Workaround
Both options are shown in the second select box in jsbin.
The text was updated successfully, but these errors were encountered: