DropdownListEvents ValueChange fires twice when upgrade to 18.4.0.35

Hi

I've just upgraded from 18.2 to 18.4.0.35 like below:

18.2 code
Child component
<SfDropDownList Placeholder="Select TestLoai"
@ref="testLoaiDDL"
Index="@Index"
TValue="int?"
TItem="TestLoaiDropdownListDto"
DataSource="testLoaiDropdownList"
AllowFiltering="true"
FilterType="@Syncfusion.Blazor.DropDowns.FilterType.Contains"
ShowClearButton="true"
Width="@Width"
PopupWidth="@PopupWidth"

>
<DropDownListFieldSettings Text="Name" Value="Id">
</DropDownListFieldSettings>

<DropDownListEvents TValue="int?" ValueChange="ValueChange"></DropDownListEvents>


</SfDropDownList>
...
[Parameter]
public int? Value { get; set; } = 1;

[Parameter]
public EventCallback<int?> ValueChanged { get; set; }

private void ValueChange(Syncfusion.Blazor.DropDowns.ChangeEventArgs<int?> args)
{
Value = args.Value;
   ValueChanged.InvokeAsync(Value);
}
Parent component
<TestLoaiDropdownList @bind-Value="testLoaiIdFilter" Width="100%" PopupWidth="auto"></TestLoaiDropdownList>
18.4.0.35 code is the same as the old one except for:
Child component
...
<DropDownListEvents TValue="int?" TItem="TestLoaiDropdownListDto" ValueChange="ValueChange"></DropDownListEvents>
...
private void ValueChange(Syncfusion.Blazor.DropDowns.ChangeEventArgs<int?, TestLoaiDropdownListDto> args)
{

Value = args.Value;
ValueChanged.InvokeAsync(Value);

}
and ValueChange always fires twice. How to fix this?

4 Replies 1 reply marked as answer

PM Ponmani Murugaiyan Syncfusion Team January 26, 2021 12:24 PM UTC

Hi Thinh, 

Greetings from Syncfusion support. 

Currently we are checking the reported query. We will check and update further details in 2 business days (January 28, 2021). We appreciate your patience until then. 

Regards, 
Ponmani M 



SP Sureshkumar P Syncfusion Team February 1, 2021 12:50 PM UTC

Hi Thinh, 
 
Thanks for your patience. 
 
We have validated your attached code example with shared information. in our latest version 18.4.35 we get only one-time change event triggers. We suggest you to use @bind-index property instead of index and also please check the below attached sample to resolve the issue. 
 
 
If still you have facing the issue, then please update your current parent and child component code example or replicate the reported issue from the above attached sample and revert us with replication procedure. These details will help us to provide exact solution as earlier as possible. 
 
Regards, 
Sureshkumar P 


Marked as answer

TH Thinh February 2, 2021 02:56 AM UTC

Dear Sureshkumar
 
I changed to bind-Index and it works fine. Thank you.

Best Regards.


VS Vignesh Srinivasan Syncfusion Team February 2, 2021 04:41 AM UTC

Hi Thinh, 
 
You are welcome. 
We are glad to know that the provided solutions worked for you. Please contact us if you require any further assistance. 
Regards, 
 
Vignesh Srinivasan 


Loader.
Up arrow icon