Hi
I've just upgraded from 18.2 to 18.4.0.35 like below:
18.2 codeChild 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?