setFocus()
sets focus to an item by its id and moves the scroll to it
setFocus(id: string | number): void;
Parameters:
id: string | number
- the id of an item
Example
list.setFocus("item_id");
note
Note that the method doesn't work if the keyboard navigation is disabled.
Related sample: List. Set active index
Change log:
added in v6.3