svelecte icon indicating copy to clipboard operation
svelecte copied to clipboard

Reset dropdownIndex after value set to null or undefined

Open szegheo opened this issue 9 months ago • 4 comments

This is not really a bug, rather than an annoying/unusal behaviour IMHO. Steps to reproduce on the Svelecte demo page (Complex playground):

  1. Use "Countries" for the Options
  2. Scroll down a bit and select a country e.g. Greece
  3. Use the "Clear selection" button on the right
  4. Click the select again to open the list
  5. 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!

szegheo avatar Sep 13 '23 12:09 szegheo