Mentions
Since 0.1.0-alpha.24IzzyBlazor.Mentions<TItem> in the IzzyBlazor.Core package, generated from the 0.1.0-alpha.31 assembly
and its doc comments.
Properties (17)
ItemsIEnumerable<TItem>?Suggestions for every trigger, narrowed in the browser as the user types.
SearchFunc<MentionQuery, CancellationToken, Task<IEnumerable<TItem>>>?Finds suggestions for a trigger and the text typed after it, for lists too long to send whole or a list for each trigger. Called with each trigger and "" to fill the list at first, then for each pause in typing. Return a short list, such as the first 10 matches.
On static pages, each pause in typing fetches the page with the typed text in its address, and Search runs in that render; it sees the address, not the form's current values. The field needs a name (inside a Form it has one) or an id; without either, the browser narrows the first results.
ItemTextFunc<TItem, string>? (computed)What's written into the text for an item, after the trigger: a handle without spaces. Defaults to the item's ToString().
ItemTemplateRenderFragment<TItem>? (computed)How a suggestion looks in the list, such as an avatar beside a full name. Defaults to ItemText.
ItemDisabledFunc<TItem, bool>?Suggestions shown but not chosen, such as someone without access.
PrefixesIReadOnlyList<string>? = @The characters that start a mention, such as ["@", "#"]. Defaults to @.
Splitstring = " "Written after a chosen name, unless the text there already starts with it. Defaults to a space.
PlacementMentionsPlacement = MentionsPlacement.BottomWhether the suggestions open below the caret's line (the default) or above it. They flip where there's no room.
DebounceTimeSpan = TimeSpan.FromMilliseconds(250)How long to wait after the last keystroke before searching. Defaults to 250 milliseconds.
Rowsint = 4Visible lines. Defaults to 4; 1 for a one-line look.
AutoGrowbool = falseGrows with the text instead of scrolling, from Rows lines up, where the browser supports CSS field-sizing.
Placeholderstring?Text in the empty field, such as "Type @ to mention someone".
MaxLengthint? (computed)Maximum length. Defaults to [StringLength] or [MaxLength].
Clearablebool = falseA button in the field that empties it, there while it holds text. Off by default.
ReadOnlybool = falseMakes the field read-only: it can be focused and its text selected, and it still posts.
@bind-Valuestring?The value, bound with @bind-Value.
DisplayNamestring?The field's name in validation messages from the input itself, such as a value that can't be parsed.
Events (0)
No events.
Types (2)
MentionQuery
recordWhat Mentions<T>'s Search is asked for: a trigger and the text typed after it.
| Member | Description |
|---|---|
Prefix string | The trigger typed, such as |
Text string | What's typed after it so far; "" when the trigger was just typed. |
MentionsPlacement
enumWhere Mentions<T>'s suggestions open, next to the line being typed.
| Value | Description |
|---|---|
Bottom | Below the line (the default). |
Top | Above the line, for a field near the bottom of the page, such as a chat box. |