BoldSignA modern eSignature application with affordable pricing. Sign up today for unlimited document usage!
When in dropdown list exist selected value and I entered value in textbox and press enter or click mouse outside, value in dropdown set to null. How this cancel?
Attachment: SolutionErrorDDList_5f148924.7z
Hi kavit,
After validating the provided information with the sample, the dropdownlist component index property value is the reason to change the component value after EditContext NotifyFieldChanged sets as a null value. So we suggest you remove the index property on dropdownlist component rendering code example to achieve your requirement:
Find the modified code example here:
<SfDropDownList TValue="TValue" TItem="TItem" @ref="@DDList" Value="@ValueT" ID="@ID" ValueChanged="ValueTChanged" ValueExpression="@ValueTExpression" Placeholder="@Placeholder" CssClass=@($"borderOnlyRight {CssClass}") OnChange="OnInput" FloatLabelType="FloatLabelType.Auto" ShowClearButton="@ShowClearButton" Query="@Query" AllowFiltering=@AllowFiltering > <DataManager Adaptor="Adaptors.CustomAdaptor" AdaptorInstance="@typeof(TAdapter)" /> <DropDownListFieldSettings Text="@PropTextItem" Value="@PropValueItem" /> <DropDownListEvents TItem="TItem" TValue="TValue" Filtering="@Filtering" OnActionComplete="@OnAutoComplete" OnClose="OnCloseEvent" OnValueSelect="OnSelect"></DropDownListEvents> </SfDropDownList> |
Find the modified sample in the attachment:
Regards,
Sureshkumar P
Thanks for the solution. How did you solve this...
Kavit, after the EditContext NotifyFieldChanged reupdate the component value so once reupdate the value property the index is the most priority to update the value. Which is the reason the component value reset to null.
thanks for the explanation