menu

Blazor

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class MentionFilteringEventArgs<T> - Blazor API Reference | Syncfusion

    Show / Hide Table of Contents

    Class MentionFilteringEventArgs<T>

    Provides event data for the Filtering event in the Mention component.

    Inheritance
    System.Object
    MentionFilteringEventArgs<T>
    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

    true to cancel the filter action; otherwise, false. Default is false.

    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 null.

    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

    true to prevent the default filtering behavior; otherwise, false. Default is false.

    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 string that contains the filter text. Default is null if not set.

    Remarks

    This value typically represents the user input after the mention character (such as '@') in the Mention control.

    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved