Skip to content

SuggestModalChooser.setSelectedItem method

SuggestModalChooser › setSelectedItem

Unofficial

Set the selected item by index, clamping the index to within the suggestions array, then invoking SuggestModalChooser.forceSetSelectedItem.

Signature:

setSelectedItem(index: number, evt?: KeyboardEvent | MouseEvent | null): void

Parameters:

ParameterTypeDescription
indexnumberIndex of the item to select.
evt?KeyboardEvent | MouseEvent | nullThe triggering event, or null / omitted to always scroll the selected item into view.

Returns: void