Class MentionPicker
MentionPicker UI element. Displays a suggestion list for mentioning users or entities.
Implements
Inherited Members
Namespace: Unity.AppUI.UI
Assembly: Unity.AppUI.dll
Syntax
public class MentionPicker : BaseVisualElement, IEventHandler, ITransform, ITransitionAnimations, IExperimentalFeatures, IVisualElementScheduler, IResolvedStyle, IContextOverrideElement, IAdditionalDataHolder
Constructors
MentionPicker()
Default constructor.
Declaration
public MentionPicker()
Fields
listUssClassName
The MentionPicker list styling class.
Declaration
public const string listUssClassName = "appui-mention-picker__list"
Field Value
| Type | Description |
|---|---|
| string |
noneElementUssClassName
The MentionPicker "no results" element styling class.
Declaration
public const string noneElementUssClassName = "appui-mention-picker__none"
Field Value
| Type | Description |
|---|---|
| string |
ussClassName
The MentionPicker main styling class.
Declaration
public const string ussClassName = "appui-mention-picker"
Field Value
| Type | Description |
|---|---|
| string |
Properties
contentContainer
The content container of the MentionPicker.
Declaration
public override VisualElement contentContainer { get; }
Property Value
| Type | Description |
|---|---|
| VisualElement |
Overrides
mentionProvider
The mention provider used to retrieve suggestions.
Declaration
public IMentionProvider mentionProvider { get; set; }
Property Value
| Type | Description |
|---|---|
| IMentionProvider |
query
The query string used to filter mention suggestions.
Declaration
public string query { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
suggestionsCount
The count of suggestions for the current query.
Declaration
public int suggestionsCount { get; }
Property Value
| Type | Description |
|---|---|
| int |
Methods
AcceptSelection()
Accepts the currently selected mention suggestion and fires the mentionSelected event.
Declaration
public void AcceptSelection()
SelectNext()
Selects the next mention suggestion in the list.
Declaration
public bool SelectNext()
Returns
| Type | Description |
|---|---|
| bool |
|
SelectPrevious()
Selects the previous mention suggestion in the list.
Declaration
public bool SelectPrevious()
Returns
| Type | Description |
|---|---|
| bool | True if the selection changed, false if it was already at the beginning of the list. |
Events
mentionSelected
Event fired when a mention suggestion is selected.
Declaration
public event Action<object> mentionSelected
Event Type
| Type | Description |
|---|---|
| Action<object> |