Skip to content

SuggestionContainer.forceSetSelectedItem method

SuggestionContainer › forceSetSelectedItem

Unofficial

Set selected item to one specified by index, if keyboard navigation, force scroll into view.

Signature:

forceSetSelectedItem(index: number, event: Event): void

Parameters:

Parameter Type Description
index number Index of the item to select.
event Event The triggering event.

Returns: void

Remarks:

Prefer setSelectedItem, which clamps the index to within suggestions array.