Skip to content

QuickSwitcherModal.onChooseSuggestion method

QuickSwitcherModal › onChooseSuggestion

Unofficial

Opens the chosen suggestion: a file or alias suggestion opens its file, an unresolved suggestion opens its link text, a bookmark suggestion opens the bookmark, and null opens (creating if needed) the file named after the query.

A mod-key event opens it in a new leaf.

Signature:

onChooseSuggestion(item: FileSuggestModalSuggestion | null, evt: MouseEvent | KeyboardEvent): void

Parameters:

ParameterTypeDescription
itemFileSuggestModalSuggestion | nullThe chosen suggestion, or null to create a new file.
evtMouseEvent | KeyboardEventThe event that chose it.

Returns: void