You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The selectItem method is expected to select the first item, as described in document.
Unfortunately, it's not working as described. Because 0 is evaluated for bool value as one condition in selectItem() to determine whether set selectedIndex attr. so selectedIndex will keep the initial null value if 0 passed, then error occurs:
The
selectItem
method is expected to select the first item, as described in document.Unfortunately, it's not working as described. Because
0
is evaluated for bool value as one condition inselectItem()
to determine whether setselectedIndex
attr. soselectedIndex
will keep the initialnull
value if0
passed, then error occurs:https://github.com/aralejs/autocomplete/blob/master/src/autocomplete.js#L134
The correct code maybe:
The text was updated successfully, but these errors were encountered: