Hello Kristof,
Greetings from Syncfusion support.
We have checked your query. There is no separate event for the X (clear/close) button of the Autocomplete. Alternatively the ‘ValueChange’ event triggers when the clear button is clicked. When the event is triggered on clicking the close button the ‘args.ItemData’ will be null with which we can differentiate. Please refer the below code snippet.
<SfAutoComplete @ref="autoObj" TValue="string" TItem="Order" Query="Query">
<SfDataManager AdaptorInstance="@typeof(CustomAdaptor)"
<AutoCompleteFieldSettings Value="CustomerID"></AutoCompleteFieldSettings>
<AutoCompleteEvents TValue="string" TItem="Order" ValueChange="OnChange"></AutoCompleteEvents>
</SfAutoComplete>
@code{
public async Task OnChange(Syncfusion.Blazor.DropDowns.ChangeEventArgs<string, Order> args)
{
if(args.ItemData == null)
{
// your code here
}
}
}
|
Please find the attached sample and kindly revert for more queries regarding this.
Regards,
Joseph Christ Nithin I