sa-si-dev / virtual-select

A javascript plugin for dropdown with virtual scroll

Home Page:https://sa-si-dev.github.io/virtual-select

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

first option always selected even when autoSelectFirstOption set to false

data-handler opened this issue · comments

commented

I am instantiating a virtual select from an existing select in the DOM (I have read the documentation that says this is not preferred approach but this is the only way this works for me). The first option is always selected even though there are no options in the DOM select that are selected, and even when setting autoSelectFirstOption to false (its default value)

The only way around this seems to be to the following:

myVirtualSelectInstance.toggleAllOptions(true);
myVirtualSelectInstance.toggleAllOptions(false);