alexa
menu

Blazor

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Search Results for

    Show / Hide Table of Contents

    Class ChipEvents

    Configure handlers to handle the events with the Chip component.

    Inheritance
    object
    ComponentBase
    OwningComponentBase
    SfOwningComponentBase
    ChipEvents
    Implements
    IComponent
    IHandleEvent
    IHandleAfterRender
    IDisposable
    Inherited Members
    ComponentBase.Assets
    ComponentBase.AssignedRenderMode
    ComponentBase.BuildRenderTree(RenderTreeBuilder)
    ComponentBase.DispatchExceptionAsync(Exception)
    ComponentBase.InvokeAsync(Action)
    ComponentBase.InvokeAsync(Func<Task>)
    ComponentBase.OnAfterRender(bool)
    ComponentBase.OnAfterRenderAsync(bool)
    ComponentBase.OnInitialized()
    ComponentBase.OnParametersSet()
    ComponentBase.OnParametersSetAsync()
    ComponentBase.RendererInfo
    ComponentBase.SetParametersAsync(ParameterView)
    ComponentBase.ShouldRender()
    ComponentBase.StateHasChanged()
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    OwningComponentBase.Dispose(bool)
    OwningComponentBase.IsDisposed
    OwningComponentBase.ScopedServices
    Namespace: Syncfusion.Blazor.Buttons
    Assembly: Syncfusion.Blazor.dll
    Syntax
    public class ChipEvents : SfOwningComponentBase, IComponent, IHandleEvent, IHandleAfterRender, IDisposable

    Constructors

    ChipEvents()

    Declaration
    public ChipEvents()

    Properties

    Created

    This created event will get triggered once the component rendering is completed.

    Declaration
    [Parameter]
    public EventCallback<object> Created { get; set; }
    Property Value
    Type Description
    EventCallback<object>

    An event callback function.

    Deleted

    Gets or sets an event callback that is raised when the chip item is deleted.

    Declaration
    [Parameter]
    public EventCallback<ChipDeletedEventArgs> Deleted { get; set; }
    Property Value
    Type Description
    EventCallback<ChipDeletedEventArgs>

    An event callback function.

    Remarks

    You can get the deleted chip details.

    Examples

    In the below code example, the deleted chip value can be obtained from the Deleted event.

    <SfChip Selection="SelectionType.Multiple" EnableDelete=true>
        <ChipEvents Deleted="@onDeleted"></ChipEvents>
        <ChipItems>
            <ChipItem Text = "Small"></ChipItem>
            <ChipItem Text = "Medium"></ChipItem>
            <ChipItem Text = "Large"></ChipItem>
            <ChipItem Text = "Extra Large"></ChipItem>
        </ChipItems>
    </SfChip>
    @code {
        private void onDeleted(ChipDeletedEventArgs args) {
            string deletedValue = args.Value;
        }
    }

    Destroyed

    This created event will get triggered once the component successfuly disposed.

    Declaration
    [Parameter]
    public EventCallback<object> Destroyed { get; set; }
    Property Value
    Type Description
    EventCallback<object>

    An event callback function.

    OnBeforeClick

    This click event will get triggered once the chip is before click.

    Declaration
    [Parameter]
    public EventCallback<ChipEventArgs> OnBeforeClick { get; set; }
    Property Value
    Type Description
    EventCallback<ChipEventArgs>

    An event callback function.

    OnClick

    This click event will get triggered once the chip is clicked.

    Declaration
    [Parameter]
    public EventCallback<ChipEventArgs> OnClick { get; set; }
    Property Value
    Type Description
    EventCallback<ChipEventArgs>

    An event callback function.

    OnDelete

    This delete event will get triggered before removing the chip.

    Declaration
    [Parameter]
    public EventCallback<ChipEventArgs> OnDelete { get; set; }
    Property Value
    Type Description
    EventCallback<ChipEventArgs>

    An event callback function.

    SelectionChanged

    Gets or sets an event callback that is raised when the selected chips are changed.

    Declaration
    [Parameter]
    public EventCallback<SelectionChangedEventArgs> SelectionChanged { get; set; }
    Property Value
    Type Description
    EventCallback<SelectionChangedEventArgs>

    An event callback function.

    Remarks

    You can get the updated SelectedChips value.

    Examples

    In the below code example, the SelectedChips value can be obtained from the SelectionChanged event.

    <SfChip Selection="SelectionType.Multiple">
        <ChipItems>
            <ChipItem Text = "Small"></ChipItem>
            <ChipItem Text = "Medium"></ChipItem>
            <ChipItem Text = "Large"></ChipItem>
            <ChipItem Text = "Extra Large"></ChipItem>
        </ChipItems>
      <ChipEvents SelectionChanged="SelectedChipsChanged" ></ChipEvents>
    </SfChip>
    @code {
        private void SelectedChipsChanged(SelectionChangedEventArgs args) {
           var selectedChipItems = args.AddedItems;
        }
    }

    Methods

    OnInitializedAsync()

    Method invoked when the component is ready to start.

    Declaration
    protected override Task OnInitializedAsync()
    Returns
    Type Description
    Task

    ="Task".

    Overrides
    ComponentBase.OnInitializedAsync()

    Implements

    IComponent
    IHandleEvent
    IHandleAfterRender
    IDisposable
    In this article
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved