sagalbot / vue-select

Everything you wish the HTML <select> element could do, wrapped up into a lightweight, extensible Vue component.
https://vue-select.org
MIT License
4.62k stars 1.33k forks source link

fix() use toRaw to compare initial raw object instead of proxy #1761

Open s-montigny-desautels opened 1 year ago

s-montigny-desautels commented 1 year ago

When using the composition API, the options may or may not be wrapped in proxy for each object. I was having a weird issue where the autoscroll feature was not working when the drop-down was opened. The selected value was a proxy, but not the items inside filteredOptions.

This fix uses the toRaw function to compare the raw object and not the Vue proxy object.