brianvoe / slim-select

Slim advanced select dropdown
http://slimselectjs.com
MIT License
1.07k stars 200 forks source link

Select options by id #555

Closed deh-code closed 3 months ago

deh-code commented 5 months ago

Fixes #543

Now the component should support options with duplicated values. Selected options are now fetched and stored by id.

I did my best to maintain API back-compatibility. Especially the setSelected method, it still support the "set by value" approach: simply it first try to fetch the option by id, if no option with the given id is found, try to fetch all the options with given value.