brianvoe / slim-select

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

Select options by id #555

Closed deh-code closed 1 month ago

deh-code commented 2 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.