Class MentionFilteringEventArgs<T>
Provides event data for the Filtering event in the Mention component.
Inheritance
Namespace: Syncfusion.Blazor.DropDowns
Assembly: Syncfusion.Blazor.dll
Syntax
public class MentionFilteringEventArgs<T> : Object
Type Parameters
Name |
---|
T |
Remarks
You can use this event data to customize filtering logic, prevent or cancel filtering behavior, and manipulate filtered results.
Examples
Example usage:
<SfMention TValue="Employee" DataSource="@Employees" Filtering="OnFiltering">
</SfMention>
@code {
private void OnFiltering(MentionFilteringEventArgs<Employee> args)
{
if (args.Text == "admin")
args.Cancel = true;
}
}
Constructors
MentionFilteringEventArgs()
Declaration
public MentionFilteringEventArgs()
Properties
Cancel
Gets or sets a value indicating whether the current filter action should be canceled.
Declaration
public bool Cancel { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
Remarks
Set this property to true
if you want to stop the default filtering process and prevent the suggestion list from updating.
FilteredData
Gets or sets the filtered data values to be shown in the popup suggestion list.
Declaration
public IEnumerable<T> FilteredData { get; set; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<T> | An System.Collections.Generic.IEnumerable<> containing the filtered data values. The default is |
Remarks
You can assign this property to override or supplement the results displayed in the Suggestion Popup for advanced data scenarios.
PreventDefaultAction
Gets or sets a value indicating whether to prevent the default filter action.
Declaration
public bool PreventDefaultAction { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
Remarks
Use this property if you want to implement entirely custom filtering logic without triggering the built-in logic.
Text
Gets the text value that is currently being typed by the user for filtering.
Declaration
public string Text { get; }
Property Value
Type | Description |
---|---|
System.String | A |
Remarks
This value typically represents the user input after the mention character (such as '@') in the Mention control.