Class MentionValueSelectedEventArgs<T>
Provides event data for the ValueSelected event in the Mention component.
Inheritance
Namespace: Syncfusion.Blazor.DropDowns
Assembly: Syncfusion.Blazor.dll
Syntax
public class MentionValueSelectedEventArgs<T> : Object
Type Parameters
Name |
---|
T |
Remarks
You can use this event data to determine which item was selected by the user and react accordingly in your application logic.
Examples
Example usage to handle the ValueSelected event:
<SfMention TValue="Employee" DataSource="@Employees" ValueSelected="OnMentionSelected">
</SfMention>
@code {
private void OnMentionSelected(MentionValueSelectedEventArgs<Employee> args)
{
var selectedItem = args.ItemData;
var value = args.Value;
// Handle selection logic
}
}
Constructors
MentionValueSelectedEventArgs()
Declaration
public MentionValueSelectedEventArgs()
Properties
ItemData
Gets the selected item from the SfMention<TItem> data source when an item is chosen.
Declaration
public T ItemData { get; }
Property Value
Type | Description |
---|---|
T | The selected item of type |
Remarks
Use the ItemData
property to access the full item object associated with the user's selection in the Mention list.
Value
Gets the value of the selected item as a string representation.
Declaration
public string Value { get; }
Property Value
Type | Description |
---|---|
System.String | A |
Remarks
This property provides the value associated with the selected item. It is frequently used to update text fields or insert mention strings into the editor or textbox.