How to check in OnSubmit if the form has been modified

I'm using RadzenTemplateForm and in the Submit method I send the data to my API to be updated.

But sometimes my edit form is opened but nothing is changed by the user, but still the call to my API is made.

Does RadzenTemplateForm have a isDirty or similar property which I can check before calling my API?
Or do I need to check it myself by implementing IEquality?

The RadzenTemplateForm has an EditContext property which has a method called IsModified. You need a @ref to the template form to use it:

<RadzenTemplateForm @ref=@myForm TItem="Customer">
@code {
    RadzenTemplateForm<Customer> myForm;

    void OnSubmit()
       if (myForm.EditContext.IsModified())
1 Like

Thanks for the quick reply.
I'll try it immediately.