Selectr
Selectr copied to clipboard
Bug found when removing item
I found a bug when removing a option, the bug is removing the original option from "this.el":
https://github.com/Mobius1/Selectr/blob/3d8964ddb926098527a295aa5102a9a36f2abf91/src/selectr.js#L1919
"remove" method for HTMLSelectElement expects an index as argument, but the option itself is supplied. This causes the first option to be removed instead of desired option.
Solution is calling this.el.remove(index) or this.el.remove(option.idx)