Blazor

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class SfMention<TItem>

    Show / Hide Table of Contents

    Class SfMention<TItem>

    The SfMention<TItem> component displays a list of suggested items from which users can select or tag one. Enter the MentionChar in the editable element and tag the any item from the suggestion list.

    Inheritance
    System.Object
    SfBaseComponent
    SfDataBoundComponent
    SfDropDownBase<TItem>
    SfMention<TItem>
    Inherited Members
    Syncfusion.Blazor.DropDowns.SfDropDownBase<TItem>.RenderListItemsAsync(System.Collections.Generic.IEnumerable<TItem>, Syncfusion.Blazor.DropDowns.FieldSettingsModel, Syncfusion.Blazor.Data.Query)
    Syncfusion.Blazor.DropDowns.SfDropDownBase<TItem>.SetListDataAsync(System.Collections.Generic.IEnumerable<TItem>, Syncfusion.Blazor.DropDowns.FieldSettingsModel, Syncfusion.Blazor.Data.Query)
    Syncfusion.Blazor.DropDowns.SfDropDownBase<TItem>.GetPropertyValue(System.Object, System.String)
    SfDropDownBase<TItem>.SetFields()
    SfDropDownBase<TItem>.ExecuteSimpleQuery(IEnumerable<TItem>, Query)
    SfDropDownBase<TItem>.CloneQuery(Query)
    Syncfusion.Blazor.DropDowns.SfDropDownBase<TItem>.GetDataByText(System.String, System.String)
    Syncfusion.Blazor.DropDowns.SfDropDownBase<TItem>.IncrementalSearch(System.String, System.Collections.Generic.IEnumerable<TItem>, System.Nullable<System.Int32>, System.Boolean)
    Syncfusion.Blazor.DropDowns.SfDropDownBase<TItem>.Search(System.String, System.Collections.Generic.IEnumerable<TItem>, System.String, System.Boolean)
    SfDropDownBase<TItem>.SetItemValue(String, Type)
    SfDropDownBase<TItem>.IsPrimitiveDataType()
    Syncfusion.Blazor.DropDowns.SfDropDownBase<TItem>.AddItems(System.Collections.Generic.IEnumerable<TItem>, System.Nullable<System.Int32>)
    SfDropDownBase<TItem>.AddItemsAsync(IEnumerable<TItem>, Nullable<Int32>)
    SfDropDownBase<TItem>.InsertItemAsync(IEnumerable<TItem>, Nullable<Int32>, Boolean)
    SfDropDownBase<TItem>.IsFilterMode()
    Syncfusion.Blazor.DropDowns.SfDropDownBase<TItem>.RenderItemsAsync(System.Collections.Generic.IEnumerable<TItem>)
    SfDropDownBase<TItem>.GetGroupedDataSourceAsync(IEnumerable<TItem>, SortOrder)
    Syncfusion.Blazor.DropDowns.SfDropDownBase<TItem>.HighlightSearch(System.String, System.String, System.Boolean, Syncfusion.Blazor.DropDowns.FilterType)
    SfDropDownBase<TItem>.Dispose(Boolean)
    SfDropDownBase<TItem>.reflectionHelper
    Syncfusion.Blazor.DropDowns.SfDropDownBase<TItem>.ListData
    Syncfusion.Blazor.DropDowns.SfDropDownBase<TItem>.MainData
    Syncfusion.Blazor.DropDowns.SfDropDownBase<TItem>.ListDataSource
    Syncfusion.Blazor.DropDowns.SfDropDownBase<TItem>.DataId
    Syncfusion.Blazor.DropDowns.SfDropDownBase<TItem>.ItemData
    Syncfusion.Blazor.DropDowns.SfDropDownBase<TItem>.IsActionFailed
    Syncfusion.Blazor.DropDowns.SfDropDownBase<TItem>.TotalCount
    Syncfusion.Blazor.DropDowns.SfDropDownBase<TItem>.ComponentName
    SfDropDownBase<TItem>.ItemTemplate
    SfDropDownBase<TItem>.GroupTemplate
    SfDropDownBase<TItem>.NoRecordsTemplate
    SfDropDownBase<TItem>.ActionFailureTemplate
    SfDropDownBase<TItem>.SortOrder
    SfDropDownBase<TItem>.DataSource
    SfDropDownBase<TItem>.Query
    SfDropDownBase<TItem>.DuplicateQuery
    SfDropDownBase<TItem>.IgnoreCase
    SfDropDownBase<TItem>.IgnoreAccent
    SfDropDownBase<TItem>.ZIndex
    SfDropDownBase<TItem>.DropDownsEditContext
    SfDataBoundComponent.SetDataManager<T>(Object)
    SfDataBoundComponent.DataManager
    SfDataBoundComponent.MainParent
    SfBaseComponent.Dispose()
    SfBaseComponent.OnObservableChange(String, Object, Boolean, NotifyCollectionChangedEventArgs)
    Namespace: Syncfusion.Blazor.DropDowns
    Assembly: Syncfusion.Blazor.dll
    Syntax
    public class SfMention<TItem> : SfDropDownBase<TItem>, IDropDowns
    Type Parameters
    Name Description
    TItem

    Specifies the type of data source.

    Examples
     
    <SfMention TItem="Games" DataSource="@GamesData">
      <ChildContent>
        <MentionFieldSettings Value="ID" Text="Text"></MentionFieldSettings>
      </ChildContent>
      <TargetComponent>
        <div id="mentionTarget" ></div>
      </TargetComponent>
    </SfMention>
    @code{
       public class Games
         {  
           public string ID { get; set; }
           public string Text { get; set; }
       }
       List<Games> GamesData = new List<Games> {
           new Games() { ID= "Game1", Text= "American Football" },
           new Games() { ID= "Game2", Text= "Badminton" },
           new Games() { ID= "Game3", Text= "Basketball" },
           new Games() { ID= "Game4", Text= "Cricket" },
           new Games() { ID= "Game5", Text= "Football" },
           new Games() { ID= "Game6", Text= "Golf" }
         };
    }

    Constructors

    SfMention()

    Declaration
    public SfMention()

    Properties

    AllowSpaces

    Gets or sets whether to continue search action if user enter space after mention character while searching.

    Declaration
    public bool AllowSpaces { get; set; }
    Property Value
    Type Description
    System.Boolean

    true, the search action takes place even after a space, if the DataSource data's are matched. The default value is false.

    Remarks

    By default, the SfMention<TItem> component will only search for mentions when the mention character is immediately followed by a non-whitespace character (e.g. @john but not @ john). However, you can change this behavior and allow the SfMention component to continue searching for mentions even if the user enters a space after the mention character by setting the AllowSpaces property to true.

    Closed

    Provides information about the Closed event callback.

    Declaration
    public EventCallback<object> Closed { get; set; }
    Property Value
    Type Description
    Microsoft.AspNetCore.Components.EventCallback<System.Object>

    Closing

    Provides information about the Closing event callback.

    Declaration
    public EventCallback<MentionClosingEventArgs> Closing { get; set; }
    Property Value
    Type Description
    Microsoft.AspNetCore.Components.EventCallback<MentionClosingEventArgs>
    Remarks

    You can prevent the popup close action using Cancel and the popup remains opened always.

    Examples
    <SfMention TItem="string" DataSource="@SizeData" Closing="@OnClosingHandler"></SfMention>
    @code{
        protected List<string> SizeData = new List<string>() { "Small", "Medium", "Large" };
        public void OnClosingHandler(MentionClosingEventArgs args) {
            args.Cancel = true;
        }
      }

    Created

    Provides information about the Created event callback.

    Declaration
    public EventCallback<object> Created { get; set; }
    Property Value
    Type Description
    Microsoft.AspNetCore.Components.EventCallback<System.Object>

    CssClass

    Gets or sets the class/multiple classes separated by a space for the SfMention<TItem> component.

    Declaration
    public string CssClass { get; set; }
    Property Value
    Type Description
    System.String

    Accepts a CSS class string separated by space to include for SfMention<TItem> popup element. The default value is String.Empty.

    Examples
     
    <SfMention CssClass="custom-mention" DataSource="@SizeData">
      <TargetComponent>
        <div id="mentionTarget" ></div>
      </TargetComponent>
    </SfMention> 
    <style>
       #mentionTarget {
          border: 2px solid grey;
          min-height: 200px;
       }
       .custom-mention .e-dropdownbase .e-list-item.e-active {
          color: #eec5d2;
       }
    </style>
    @code{
       protected List<string> SizeData = new List<string>() { "Small", "Medium", "Large" };
    }

    Destroyed

    Provides information about the Destroyed event callback.

    Declaration
    public EventCallback<object> Destroyed { get; set; }
    Property Value
    Type Description
    Microsoft.AspNetCore.Components.EventCallback<System.Object>

    DisplayTemplate

    Gets or sets a template that defines how the selected value will be displayed in the editable component. The TItem" is passed as a context to the template, allowing it to access information about the suggested item, such as its Value and Text.

    Declaration
    public RenderFragment<TItem> DisplayTemplate { get; set; }
    Property Value
    Type Description
    Microsoft.AspNetCore.Components.RenderFragment<TItem>

    The template content. The default value is null.

    Examples
     
    <SfMention TItem="EmployeeData" Query="@Query" PopupWidth="250px">
        <TargetComponent>
           <div id="mentionTarget" ></div>
        </TargetComponent>
        <DisplayTemplate>
           <span class='name'>@@@((context as EmployeeData).FirstName)</span>
        </DisplayTemplate>
        <ChildContent>
            <SfDataManager Url="https://ej2services.syncfusion.com/production/web-services/api/Orders" Adaptor="Adaptors.WebApiAdaptor"></SfDataManager>
            <MentionFieldSettings Value="ShipCity" Text="ShipName"></MentionFieldSettings>
        </ChildContent>
    </SfMention> 
    <style>
       #mentionTarget {
          border: 2px solid grey;
          min-height: 200px;
       }
    </style>
    @code{
       public class EmployeeData
       {
            public string FirstName { get; set; }
            public string Country { get; set; }
       }
       public EmployeeData Data = new EmployeeData();
       public Query Query = new Query();
    }

    Filtering

    Provides information about the Filtering event callback.

    Declaration
    public EventCallback<MentionFilteringEventArgs<TItem>> Filtering { get; set; }
    Property Value
    Type Description
    Microsoft.AspNetCore.Components.EventCallback<MentionFilteringEventArgs<TItem>>
    Examples
    <SfMention TItem="string" DataSource="@SizeData" Filtering="@OnFilteringHandler"></SfMention>
    @code{
        protected List<string> SizeData = new List<string>() { "Small", "Medium", "Large" };
        public async Task OnFilteringHandler(MentionFilteringEventArgs args) {
    
        }
      }

    FilterType

    Gets or sets the filter type that specifies the match criteria while searching for mentions. The possible values for the FilterType property are:

    • StartsWithlists the items if the start of the text in the item matches with the search term or input string.
    • EndsWithlists the items if the end of the text in the item matches with the search term or input string.
    • Containslists the items if the item text contains the search term or input string.
    Declaration
    public override FilterType FilterType { get; set; }
    Property Value
    Type Description
    FilterType

    One of the FilterType enumeration that specifies the match criteria while searching. The default value is Contains.

    Overrides
    Syncfusion.Blazor.DropDowns.SfDropDownBase<TItem>.FilterType
    Examples
     
    <SfMention FilterType="FilterType.Contains" DataSource="@SizeData">
      <TargetComponent>
        <div id="mentionTarget" ></div>
      </TargetComponent>
    </SfMention> 
    <style>
       #mentionTarget {
          border: 2px solid grey;
          min-height: 200px;
       }
    </style>
    @code{
       protected List<string> SizeData = new List<string>() { "Small", "Medium", "Large" };
    }

    Highlight

    Gets or sets whether to highlight the searched characters on suggestion list items.

    Declaration
    public bool Highlight { get; set; }
    Property Value
    Type Description
    System.Boolean

    true, enable the highlighting of the searched characters in the suggestions list. The default value is false.

    ID

    Gets or sets the id of the SfMention<TItem> component.

    Declaration
    public string ID { get; set; }
    Property Value
    Type Description
    System.String

    It sets the unique ID for the SfMention<TItem> component.

    MentionChar

    Gets or sets the symbol or single character which triggers the search action in the SfMention<TItem> component. The SfMention component listens to user input on the Target element displays suggestions as soon as the user enters the mention character.

    Declaration
    public char MentionChar { get; set; }
    Property Value
    Type Description
    System.Char

    A character of symbol. By default, the trigger character is the @ symbol..

    Examples
     
    <SfMention MentionChar='#' DataSource="@SizeData">
      <TargetComponent>
        <div id="mentionTarget" ></div>
      </TargetComponent>
    </SfMention>
    <style>
       #mentionTarget {
          border: 2px solid grey;
          min-height: 200px;
       }
    </style>
    @code{
       protected List<string> SizeData = new List<string>() { "Small", "Medium", "Large" };
    }

    MinLength

    Gets or sets the minimum length of user input that is required to initiate the search action.

    Declaration
    public int MinLength { get; set; }
    Property Value
    Type Description
    System.Int32

    The minimum number of characters user input that is required to initiate the search action.The default value is 0.

    Remarks

    By default, the SfMention<TItem> component will initiate a search as soon as the user begins typing in the editable element. You can change this behavior by setting the MinLength property.

    Examples

    For example, if you wanted to require the user to enter at least 3 characters before a search is initiated, you could use the following code:

     
    <SfMention MinLength=3 DataSource="@SizeData">
      <TargetComponent>
        <div id="mentionTarget" ></div>
      </TargetComponent>
    </SfMention> 
    <style>
       #mentionTarget {
          border: 2px solid grey;
          min-height: 200px;
       }
    </style>
    @code{
       protected List<string> SizeData = new List<string>() { "Small", "Medium", "Large" };
    }

    OnActionBegin

    Provides information about the OnActionBegin event callback.

    Declaration
    public EventCallback<ActionBeginEventArgs> OnActionBegin { get; set; }
    Property Value
    Type Description
    Microsoft.AspNetCore.Components.EventCallback<ActionBeginEventArgs>
    Remarks

    You can prevent the action using Cancel.

    Examples
    <SfMention TItem="string" DataSource="@SizeData" OnActionBegin="@OnActionBeginHandler"></SfMention>
    @code{
        protected List<string> SizeData = new List<string>() { "Small", "Medium", "Large" };
        public void OnActionBeginHandler(ActionBeginEventArgs args) {
            args.Cancel = true;
        }
      }

    OnActionComplete

    Provides information about the OnActionComplete event callback.

    Declaration
    public EventCallback<ActionCompleteEventArgs<TItem>> OnActionComplete { get; set; }
    Property Value
    Type Description
    Microsoft.AspNetCore.Components.EventCallback<ActionCompleteEventArgs<TItem>>
    Examples
    <SfMention TItem="string" DataSource="@SizeData" OnActionComplete="@OnActionCompleteHandler"></SfMention>
    @code{
        protected List<string> SizeData = new List<string>() { "Small", "Medium", "Large" };
        public void OnActionCompleteHandler(ActionBeginEventArgs<string> args) {
            args.Cancel = true;
        }
      }

    OnActionFailure

    Provides information about the OnActionFailure event callback.

    Declaration
    public EventCallback<Exception> OnActionFailure { get; set; }
    Property Value
    Type Description
    Microsoft.AspNetCore.Components.EventCallback<System.Exception>

    Opened

    Provides information about the Opened event callback.

    Declaration
    public EventCallback<object> Opened { get; set; }
    Property Value
    Type Description
    Microsoft.AspNetCore.Components.EventCallback<System.Object>

    Opening

    Provides information about the Opening event callback.

    Declaration
    public EventCallback<MentionOpeningEventArgs> Opening { get; set; }
    Property Value
    Type Description
    Microsoft.AspNetCore.Components.EventCallback<MentionOpeningEventArgs>
    Remarks

    You can prevent the popup open action using .

    Examples
    <SfMention TItem="string" DataSource="@SizeData" Opening="@OnOpeningHandler"></SfMention>
    @code{
        protected List<string> SizeData = new List<string>() { "Small", "Medium", "Large" };
        public void OnOpeningHandler(MentionOpeningEventArgs args) {
            args.Cancel = true;
        }
      }

    PopupHeight

    Gets or sets the popup's height value in pixels/number/percentage. If a number value is specified, it will be treated as pixels.

    Declaration
    public string PopupHeight { get; set; }
    Property Value
    Type Description
    System.String

    Accepts PopupHeight property accepts a value in pixels, number, or percentage. The default value is 300px.

    Examples

    For example, if you wanted to set the height of the popup to 200 pixels, you could use the following code:

     
    <SfMention PopupHeight="200px" DataSource="@SizeData">
      <TargetComponent>
        <div id="mentionTarget" ></div>
      </TargetComponent>
    </SfMention> 
    <style>
       #mentionTarget {
          border: 2px solid grey;
          min-height: 200px;
       }
    </style>
    @code{
       protected List<string> SizeData = new List<string>() { "Small", "Medium", "Large" };
    }

    PopupWidth

    Gets or sets the popup's width value in pixels/number/percentage. If a number value is specified, it will be treated as pixels.

    Declaration
    public string PopupWidth { get; set; }
    Property Value
    Type Description
    System.String

    Accepts PopupWidth property accepts a value in pixels, number, or percentage. The default value is auto.

    Examples

    For example, if you wanted to set the width of the popup to 250 pixels, you could use the following code:

     
    <SfMention PopupWidth="250px" DataSource="@SizeData">
      <TargetComponent>
        <div id="mentionTarget" ></div>
      </TargetComponent>
    </SfMention> 
    <style>
       #mentionTarget {
          border: 2px solid grey;
          min-height: 200px;
       }
    </style>
    @code{
       protected List<string> SizeData = new List<string>() { "Small", "Medium", "Large" };
    }

    ShowMentionChar

    Gets or sets whether to show the MentionChar along with with the text when displaying selected mention item in target.

    Declaration
    public bool ShowMentionChar { get; set; }
    Property Value
    Type Description
    System.Boolean

    true, the selected mention item displayed along with the mention character. The default value is false.

    Remarks

    If ShowMentionChar is set to true, the mention component will display the mention character along with the text of the mentioned item. For example, if the mention character is @ and the user mentions the item "John Doe", the mention will be displayed as @John Doe.

    SpinnerTemplate

    Gets or sets a template that defines the appearance of the loading initiator in the popup. This template is displayed until the data for the suggestions has been loaded.

    Declaration
    public RenderFragment SpinnerTemplate { get; set; }
    Property Value
    Type Description
    Microsoft.AspNetCore.Components.RenderFragment

    The template content. The default value is null.

    Examples
     
    <SfMention TItem="EmployeeData" Query="@Query" PopupWidth="250px">
        <TargetComponent>
            <div id="mentionTarget" ></div>
        </TargetComponent>
        <SpinnerTemplate>
            <div class="spinner_loader"></div>
         </SpinnerTemplate>
        <ChildContent>
            <SfDataManager Url="https://ej2services.syncfusion.com/production/web-services/api/Orders" Adaptor="Adaptors.WebApiAdaptor"></SfDataManager>
            <MentionFieldSettings Value="ShipCity" Text="ShipName"></MentionFieldSettings>
        </ChildContent>
    </SfMention> 
    <style>
       #mentionTarget {
          border: 2px solid grey;
          min-height: 200px;
       }
    </style>
    @code{
       public class EmployeeData
       {
            public string FirstName { get; set; }
            public string Country { get; set; }
       }
       public EmployeeData Data = new EmployeeData();
       public Query Query = new Query();
    }

    SuffixText

    Gets or sets the custom suffix that will be appended to the end of the mentioned item's text when it is inserted into the target editor.

    Declaration
    public string SuffixText { get; set; }
    Property Value
    Type Description
    System.String

    Accepts SuffixText as string value. The default value is String.Empty.

    Remarks

    When a item is selected, the SfMention<TItem> component will automatically insert the text of the mentioned item into the target editor. By default, the mention component will insert the text of the mentioned item without any additional text or characters. However, you can specify a custom suffix that will be appended to the end of the mentioned item's text when it is inserted into the target editor.

    Examples
     
    <SfMention SuffixText="&nbsp;" DataSource="@SizeData">
      <TargetComponent>
        <div id="mentionTarget" ></div>
      </TargetComponent>
    </SfMention> 
    <style>
       #mentionTarget {
          border: 2px solid grey;
          min-height: 200px;
       }
    </style>
    @code{
       protected List<string> SizeData = new List<string>() { "Small", "Medium", "Large" };
    }

    SuggestionCount

    Gets or sets the maximum number of items that will be displayed in the suggestion list.

    Declaration
    public int SuggestionCount { get; set; }
    Property Value
    Type Description
    System.Int32

    The maximum number of items that will be displayed in the suggestion list. The default value is 25.

    Examples
     
    <SfMention SuggestionCount=15 DataSource="@SizeData">
      <TargetComponent>
        <div id="mentionTarget" ></div>
      </TargetComponent>
    </SfMention> 
    <style>
       #mentionTarget {
          border: 2px solid grey;
          min-height: 200px;
       }
    </style>
    @code{
       protected List<string> SizeData = new List<string>() { "Small", "Medium", "Large" };
    }

    Target

    Gets or sets the target selector for displaying the SfMention<TItem> component. The SfMention component listens to user input on the target element displays suggestions as soon as the user enters the mention character. This allows users to easily select items from the list of suggestions by typing the mention character and then selecting an item from the list.

    Declaration
    public string Target { get; set; }
    Property Value
    Type Description
    System.String

    An element on the page should be used as the target for the SfMention component, so that mention component displays suggestion list opens relative to the elements cursor position.

    Remarks

    The Target property is required and must be specified.

    Examples
     
    <SfMention DataSource="@SizeData">
    <TargetComponent>
        <div id="mentionTarget" ></div>
    </TargetComponent>
    </SfMention>
    <style>
       #mentionTarget {
          border: 2px solid grey;
          min-height: 200px;
       }
    </style>
    @code{
       protected List<string> SizeData = new List<string>() { "Small", "Medium", "Large" };
    }

    TargetComponent

    Gets or sets the target component for displaying the SfMention<TItem> component. The SfMention component listens to user input on the target component displays suggestions as soon as the user enters the mention character. This allows users to easily select items from the list of suggestions by typing the mention character and then selecting an item from the list.

    Declaration
    public RenderFragment TargetComponent { get; set; }
    Property Value
    Type Description
    Microsoft.AspNetCore.Components.RenderFragment

    The template content. The default value is null.

    Remarks

    SfMention<TItem> is attached to the first element of the TargetComponent.

    Examples
     
    <div id="mentionTarget" ></div>
    <SfMention TItem="EmployeeData" Query="@Query" PopupWidth="250px">
        <TargetComponent>
           <div id="mentionTarget"></div>
        </TargetComponent>
        <ChildContent>
            <SfDataManager Url="https://ej2services.syncfusion.com/production/web-services/api/Orders" Adaptor="Adaptors.WebApiAdaptor"></SfDataManager>
            <MentionFieldSettings Value="ShipCity" Text="ShipName"></MentionFieldSettings>
        </ChildContent>
    </SfMention> 
    <style>
       #mentionTarget {
          border: 2px solid grey;
          min-height: 200px;
       }
    </style>
    @code{
       public class EmployeeData
       {
            public string FirstName { get; set; }
            public string Country { get; set; }
       }
       public EmployeeData Data = new EmployeeData();
       public Query Query = new Query();
    }

    ValueSelected

    Provides information about the ValueSelected event callback.

    Declaration
    public EventCallback<MentionValueSelectedEventArgs<TItem>> ValueSelected { get; set; }
    Property Value
    Type Description
    Microsoft.AspNetCore.Components.EventCallback<MentionValueSelectedEventArgs<TItem>>
    Remarks

    This event triggers when an item in a popup is selected or when the model value is changed by user.

    Examples
    <SfMention TItem="string" DataSource="@SizeData" ValueSelected="@OnValueSelectedHandler"></SfMention>
    @code{
        protected List<string> SizeData = new List<string>() { "Small", "Medium", "Large" };
        public void OnValueSelectedHandler(MentionValueSelectedEventArgs<TItem> args) {
    
        }
      }

    ValueSelecting

    Provides information about the ValueSelecting event callback.

    Declaration
    public EventCallback<MentionValueSelectingEventArgs<TItem>> ValueSelecting { get; set; }
    Property Value
    Type Description
    Microsoft.AspNetCore.Components.EventCallback<MentionValueSelectingEventArgs<TItem>>
    Remarks

    You can prevent the item selection action using Cancel.

    Examples
    <SfMention TItem="string" DataSource="@SizeData" ValueSelecting="@OnValueSelectingHandler"></SfMention>
    @code{
        protected List<string> SizeData = new List<string>() { "Small", "Medium", "Large" };
        public void OnValueSelectingHandler(MentionValueSelectingEventArgs<string> args) {
            if(args.ItemData== "Medium")
                args.Cancel = true;
        }
      }

    Methods

    ActionBeginAsync(IEnumerable<TItem>, Query)

    Task which performs the action begin event.

    Declaration
    protected override Task<ActionBeginEventArgs> ActionBeginAsync(IEnumerable<TItem> dataSource, Query query = null)
    Parameters
    Type Name Description
    System.Collections.Generic.IEnumerable<TItem> dataSource

    Specifies the datasource.

    Query query

    Specifies the query.

    Returns
    Type Description
    System.Threading.Tasks.Task<ActionBeginEventArgs>

    Task.

    Overrides
    Syncfusion.Blazor.DropDowns.SfDropDownBase<TItem>.ActionBeginAsync(System.Collections.Generic.IEnumerable<TItem>, Syncfusion.Blazor.Data.Query)

    ActionCompleteAsync(IEnumerable<TItem>, Query)

    Task which performs the action complete event.

    Declaration
    protected override Task ActionCompleteAsync(IEnumerable<TItem> dataSource, Query query = null)
    Parameters
    Type Name Description
    System.Collections.Generic.IEnumerable<TItem> dataSource

    Specifies the datasource.

    Query query

    Specifies the query.

    Returns
    Type Description
    System.Threading.Tasks.Task

    Task.

    Overrides
    Syncfusion.Blazor.DropDowns.SfDropDownBase<TItem>.ActionCompleteAsync(System.Collections.Generic.IEnumerable<TItem>, Syncfusion.Blazor.Data.Query)

    ActionFailureAsync(Object)

    Task which performs the action failure event.

    Declaration
    protected override Task ActionFailureAsync(object arguments)
    Parameters
    Type Name Description
    System.Object arguments

    Specifies the object arguments.

    Returns
    Type Description
    System.Threading.Tasks.Task

    Task.

    Overrides
    Syncfusion.Blazor.DropDowns.SfDropDownBase<TItem>.ActionFailureAsync(System.Object)

    BuildRenderTree(RenderTreeBuilder)

    Declaration
    protected override void BuildRenderTree(RenderTreeBuilder __builder)
    Parameters
    Type Name Description
    Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder __builder

    FilterAsync(IEnumerable<TItem>, Query, MentionFieldSettings)

    To filter the data from given data source by using query.

    Declaration
    public Task FilterAsync(IEnumerable<TItem> dataSource, Query query = null, MentionFieldSettings fields = null)
    Parameters
    Type Name Description
    System.Collections.Generic.IEnumerable<TItem> dataSource

    Specifies the data source.

    Query query

    Specifies the query.

    MentionFieldSettings fields

    Specifies the fields.

    Returns
    Type Description
    System.Threading.Tasks.Task

    Task.

    GetItemData(TItem)

    Method which gets item data.

    Declaration
    protected MentionItemModel GetItemData(TItem item = null)
    Parameters
    Type Name Description
    TItem item

    Specifies the item.

    Returns
    Type Description
    Syncfusion.Blazor.DropDowns.MentionItemModel

    Task.

    GetQuery(Query)

    Task which gets the query.

    Declaration
    protected override Query GetQuery(Query query)
    Parameters
    Type Name Description
    Query query

    Specifies the query.

    Returns
    Type Description
    Query

    Query.

    Overrides
    Syncfusion.Blazor.DropDowns.SfDropDownBase<TItem>.GetQuery(Syncfusion.Blazor.Data.Query)

    HidePopupAsync()

    To hide the suggestion list in the SfMention<TItem> component.

    Declaration
    public Task HidePopupAsync()
    Returns
    Type Description
    System.Threading.Tasks.Task

    Task.

    InvokeBeforeOpen()

    Triggers before popup get opened.

    Declaration
    protected virtual Task<bool> InvokeBeforeOpen()
    Returns
    Type Description
    System.Threading.Tasks.Task<System.Boolean>

    Task.

    ListItemCreated(ListOptions<TItem>)

    Task which specifies the list item created event.

    Declaration
    protected override ListOptions<TItem> ListItemCreated(ListOptions<TItem> listItem)
    Parameters
    Type Name Description
    ListOptions<TItem> listItem

    Specifies the list item.

    Returns
    Type Description
    ListOptions<TItem>

    ListOptions.

    Overrides
    Syncfusion.Blazor.DropDowns.SfDropDownBase<TItem>.ListItemCreated(Syncfusion.Blazor.DropDowns.ListOptions<TItem>)

    OnAfterRenderAsync(Boolean)

    Triggers after each time the component has been rendered.

    Declaration
    protected override Task OnAfterRenderAsync(bool firstRender)
    Parameters
    Type Name Description
    System.Boolean firstRender

    true if the component rendered for the first time.

    Returns
    Type Description
    System.Threading.Tasks.Task

    Task.

    Overrides
    SfDataBoundComponent.OnAfterRenderAsync(Boolean)

    OnInitializedAsync()

    Triggers while initial rendering of the component.

    Declaration
    protected override Task OnInitializedAsync()
    Returns
    Type Description
    System.Threading.Tasks.Task

    Task.

    Overrides
    Syncfusion.Blazor.DropDowns.SfDropDownBase<TItem>.OnInitializedAsync()

    OnParametersSetAsync()

    Triggers when any changes in component state occurs.

    Declaration
    protected override Task OnParametersSetAsync()
    Returns
    Type Description
    System.Threading.Tasks.Task

    Task.

    Overrides
    Syncfusion.Blazor.DropDowns.SfDropDownBase<TItem>.OnParametersSetAsync()

    RenderEqualItemsAsync()

    Update the custom value to the list

    Declaration
    protected Task RenderEqualItemsAsync()
    Returns
    Type Description
    System.Threading.Tasks.Task

    Task.

    SearchAsync(String, String, String)

    The method for displaying a suggestion list based on position X and Y values and text.

    Declaration
    public Task SearchAsync(string text, string positionX, string positionY)
    Parameters
    Type Name Description
    System.String text

    Specify the search character.

    System.String positionX

    Specify the popup X position.

    System.String positionY

    Specify the popup Y position.

    Returns
    Type Description
    System.Threading.Tasks.Task

    Task.

    ShowPopupAsync()

    To display the suggestion list in the SfMention<TItem> component.

    Declaration
    public Task ShowPopupAsync()
    Returns
    Type Description
    System.Threading.Tasks.Task

    Task.

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