svelecte
svelecte copied to clipboard
Reset dropdownIndex after value set to null or undefined
This is not really a bug, rather than an annoying/unusal behaviour IMHO. Steps to reproduce on the Svelecte demo page (Complex playground):
- Use "Countries" for the Options
- Scroll down a bit and select a country e.g. Greece
- Use the "Clear selection" button on the right
- Click the select again to open the list
- Previous scroll and selection is remembered (highlighted)
In my current project I would really need to let the dropdown scrolled to the top after clearing the current value. I would be fine with a new option to let the component work like this, or with a new API method to do this on my own after value has been cleared. Thank you!