BoldDeskWe are launching BoldDesk on Product Hunt soon. Learn more & follow us.
In an EditForm which contains an EditContext to follow the change made on the model, if you click on a button of the EditForm which contains SfRichTextEditor, the SfRichTextEditor is detected that it has been changed
In the attached example, I bound the SfRichTextEditor component with the Comment property.
if I click on a button of the EditForm the OnFieldChanged event is triggered to say that the comment property has been modified (its value is always Null).
The problem is reproducible only if the property is Null
<EditForm EditContext="@EditContext"> <h3>Test SfRichText</h3> <div class="row"> <label>Name</label> <InputText @bind-Value="customer.Name"></InputText> </div> <SfRichTextEditor @bind-Value="customer.Comment"></SfRichTextEditor> <button class="btn btn-primary" @onclick="click">Test</button> </EditForm>public class Customer { public int Id { get; set; } public string Name { get; set; } public string Comment { get; set; } = string.Empty; } |
Hi Vinitha,
Thank you for your reply.
yes I know this workaround well, but I already have objects in the database, so I have to change everything I have to make it work for them too.
Thanks again.
Disclaimer: “Inclusion of this solution in the weekly release may change due to other factors including but not limited to QA checks and works reprioritization.”
Hi SAID,
We have included the fix for the issue "EditForm ValueChanged event got triggered initially, when we initialize the RichTextEditor value as null" with our package version 20.4.53. So, can you please upgrade your package to the latest to resolve the issue from your end.
Release notes: https://blazor.syncfusion.com/documentation/release-notes/20.4.53?type=all#richtexteditor
Regards,
Vinothkumar