I have an sfcombobox with 10 data.When I bind third record on button click then it showing as "twice".Please check below screencast and advise how to resolve this issues.
The attached code working fine in .Net 5.0 without showing twice record on binding
The reported issue is not an issue from the component side. The OnInitializedAsync lifecycle triggers two times when the component is rendering which is the reason the data is duplicated twice in the component. To overcome this issue, need to change the render mode from “ServerPrerendered” to “Server” in the _Host.cshtml
Find the code changed here:
<component type="typeof(App)" render-mode="Server" />
To know more about this behavior, refer to the StackOverflow link solution: https://stackoverflow.com/questions/58075628/why-are-blazor-lifecycle-methods-getting-executed-twice
find the modified sample in the attachment:
I am using Blazor Web-Assembly..
How to do in this...
KINS, you have attached the server-side sample to replicate the issue on your initial update. So was modified and attached the server-side sample to resolve the issue from our end. if you have faced the same issue in the WASM application, share your issue replicating sample with us, based on your updated sample will validate and update the exact solution as earlier as possible.
check this attached example
KINS, you have attached a sample with the target framework as netstandard2.1 so created the sample based on your shared code example with .Net 6.0 but still, the issue is not replicated from our end.
Find the validated sample in the attachment.
Still, if you have faced the same issue, then replicate the reported issue on the attached sample and revert us with a detailed issue replication procedure. these details will help us to provide an exact solution as earlier as possible.