Clear button not working.

Hi there.
In the combo box component, I found out that the clear button does not send the proper values to the valuechange method.

Test the following code.

Put a breakpoint in the  ValueChangeHandler and check the args values.
Select a game and then press the clear button.

The event is raised by pressing the clear button but the args contains the values that are completed in the combobox. It should be null...


@page "/test2"

@using Syncfusion.Blazor.DropDowns


<SfComboBox TItem="GameFields" TValue="string" DataSource="@Games">

    <ComboBoxEvents TItem="GameFields" TValue="string" ValueChange="@ValueChangeHandler"></ComboBoxEvents>

    <ComboBoxFieldSettings Text="Text" Value="ID"></ComboBoxFieldSettings>

</SfComboBox>


@code {

    public class GameFields

    {

        public string ID { get; set; }

        public string Text { get; set; }

    }


    private List<GameFields> Games = new List<GameFields>() {

        new GameFields(){ ID= "Game1", Text= "American Football" },

        new GameFields(){ ID= "Game2", Text= "Badminton" },

        new GameFields(){ ID= "Game3", Text= "Basketball" },

        new GameFields(){ ID= "Game4", Text= "Cricket" },

     };


    private void ValueChangeHandler(ChangeEventArgs<string, GameFields> args)

    {

        // Here, you can customize your code.

    }

}


3 Replies

SP Sureshkumar P Syncfusion Team June 6, 2022 11:04 AM UTC

We have validated your reported issue with a shared code example, we cannot replicate the reported issue on our end. We have included the video demonstration of the validation. Please find the video demonstration in the attachment.

If still, you have faced the same issue, then please provide the below details

  1. Share your exact Syncfusion package version.

  2. Share the details of whether you have installed an individual or common Syncfusion package in your application.

  3. What are the packages you have installed in your application?

  4. Share whether you have server-side or client-side applications on your end.

  5. If possible, please share the issue replication sample with a detailed issue replication procedure.

These detail will help us to provide an exact solution as earlier as possible.


Attachment: chrome_pM2s2Wo8Tt_c23fdd62.zip


RI Rigakis June 6, 2022 07:04 PM UTC

Hi there.


What can I say???

The night was (not) young, and it seems that I was tired enough to confuse the ItemData with the  PreviousItemData field.
I can not reproduce the "error" myself.

I am sorry for the inconvenience.




RP Ranjani Prabakaran Syncfusion Team June 7, 2022 04:36 AM UTC

Hi Rigakis,


Please get back to us if you need any further assistance. We would be happy to help you out.


Regards,


Ranjani


Loader.
Up arrow icon