MentionMenuProps
type MentionMenuProps = { debounceMs?: number; editor: EditorHandle; eventName?: string; formatLabel?: (user) => string; mentionHref?: (user) => string; searchUsers?: (query, signal) => Promise<readonly MentionUser[]>; users?: readonly MentionUser[];};Defined in: react/src/extensions/mention.tsx:172
Properties
Section titled “Properties”| Property | Type | Description | Defined in |
|---|---|---|---|
debounceMs? | number | Debounce window for searchUsers calls. Default 150 ms. | react/src/extensions/mention.tsx:187 |
editor | EditorHandle | - | react/src/extensions/mention.tsx:173 |
eventName? | string | - | react/src/extensions/mention.tsx:188 |
formatLabel? | (user) => string | How to format the inserted mention’s display text. Default '@{name}'. | react/src/extensions/mention.tsx:190 |
mentionHref? | (user) => string | href used on the inserted link mark. Default #user-{id}. | react/src/extensions/mention.tsx:192 |
searchUsers? | (query, signal) => Promise<readonly MentionUser[]> | Async user-search function. Called whenever the query changes (after debounceMs); the resolved array replaces the menu contents. Stale responses are discarded if a newer query has been submitted, and the signal is aborted to let consumers cancel in-flight requests. | react/src/extensions/mention.tsx:185 |
users? | readonly MentionUser[] | Static list of users to filter client-side. Mutually exclusive with searchUsers. If neither is provided, DEFAULT_MENTION_USERS is used. | react/src/extensions/mention.tsx:178 |