Blazor

Upgrade Guide User Guide Demos Support Forums Download
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class ChipEvents - Blazor API Reference | Syncfusion

    Show / Hide Table of Contents

    Class ChipEvents

    Configure handlers to handle the events with the Chip component.

    Inheritance
    System.Object
    SfBaseComponent
    ChipEvents
    Inherited Members
    SfBaseComponent.OnAfterRenderAsync(Boolean)
    SfBaseComponent.Dispose()
    SfBaseComponent.Dispose(Boolean)
    SfBaseComponent.OnObservableChange(String, Object, Boolean, NotifyCollectionChangedEventArgs)
    Namespace: Syncfusion.Blazor.Buttons
    Assembly: Syncfusion.Blazor.dll
    Syntax
    public class ChipEvents : SfBaseComponent

    Constructors

    ChipEvents()

    Declaration
    public ChipEvents()

    Properties

    Created

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

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

    Deleted

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

    Declaration
    public EventCallback<ChipDeletedEventArgs> Deleted { get; set; }
    Property Value
    Type Description
    Microsoft.AspNetCore.Components.EventCallback<ChipDeletedEventArgs>
    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
    public EventCallback<object> Destroyed { get; set; }
    Property Value
    Type Description
    Microsoft.AspNetCore.Components.EventCallback<System.Object>

    OnBeforeClick

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

    Declaration
    public EventCallback<ChipEventArgs> OnBeforeClick { get; set; }
    Property Value
    Type Description
    Microsoft.AspNetCore.Components.EventCallback<ChipEventArgs>

    OnClick

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

    Declaration
    public EventCallback<ChipEventArgs> OnClick { get; set; }
    Property Value
    Type Description
    Microsoft.AspNetCore.Components.EventCallback<ChipEventArgs>

    OnDelete

    This delete event will get triggered before removing the chip.

    Declaration
    public EventCallback<ChipEventArgs> OnDelete { get; set; }
    Property Value
    Type Description
    Microsoft.AspNetCore.Components.EventCallback<ChipEventArgs>

    Methods

    OnInitializedAsync()

    Method invoked when the component is ready to start.

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

    ="Task".

    Overrides
    SfBaseComponent.OnInitializedAsync()
    Back to top Generated by DocFX
    Copyright © 2001 - 2022 Syncfusion Inc. All Rights Reserved