property UseMentionAutocompleteResult.syncMention

Follows the @query under the caret, searches for it 150 ms after the last keystroke, and closes the list once the caret leaves it. The caller calls it on every change with lookup set, and on every caret move without, since only typing may search.

Type

(
value: string,
pos: number,
lookup: boolean
) => void

Usage

import { type UseMentionAutocompleteResult } from "src/hooks/editor/useMentionAutocomplete.ts";