I have a select2
dropdown with a few values (let's say colors), and I want to remove from the dropdown list the current selected item. For example, if all the options are
white, green, red, blue
and the current selected item is white
, if the user clicks on the dropdown, he'll only see the other 3 colors (green, red and blue
).
Now, I can easily remove the currently selected item with jquery, and restore it back on change, but that really doesn't feel clean.
Is there any built-in method for doing that, or at least a method that is a little bit more "cleaner"?