Unplanned
Last Updated: 18 Jun 2025 07:49 by ADMIN
p
Created on: 13 Jun 2025 11:02
Category: Form
Type: Feature Request
1
Disable Submit Buttons During Async Submission in Kendo React Form

 

Description:
In our application, we use Kendo React Form. When the user submits the form, we call an async API in the onSubmit handler. We want to prevent users from clicking the submit buttons (including custom buttons in our office ribbon) while the API call is in progress, and only re-enable them after the API call completes (either success or failure).

Currently, formRenderProps.allowSubmit only reflects the form’s validation state, not the async submission state. This means users can click the submit buttons multiple times while the API call is pending.

 

Expected Behavior:
There should be a built-in way (e.g., a submitting or loading flag in formRenderProps) to indicate when the form is in the process of submitting, so we can disable submit buttons during this time.
Alternatively, the form should automatically prevent further submissions until the async onSubmit completes.

 

Questions:
Is there a recommended way to handle this scenario with Kendo React Form?
If not, can you consider adding a submitting or loading state to formRenderProps for this purpose?

 

Example:


<Form
  onSubmit={async (data, closeAfterSave) => {
    // API call here
  }}
  render={formRenderProps => (
    <button
      disabled={!formRenderProps.allowSubmit || formRenderProps.submitting}
      onClick={() => formRenderProps.onSubmit(false)}
    >
      Save
    </button>
  )}
/>

3 comments
ADMIN
Filip
Posted on: 18 Jun 2025 07:49

Hello,

Thank you for clarifying your requirements.

At present, the KendoReact Form component does not offer an internal submitting or loading state in its `formRenderProps`. The `formRenderProps` object only tracks validation state (such as allowSubmit), not the asynchronous submission state. However I agree that having an inbuilt mechanism would bring value to the suite and therefore I have converted this ticket to an official feature request.

I have also added your vote for convenience, we will be monitoring the interest in this request.

Regards,
Filip
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

p
Posted on: 17 Jun 2025 09:02

Hi, thank you for your response.

This isn't quite what we were aiming for. Our goal is for the Form component itself to internally manage the submitting and loading states, including handling the button's disabled status. Ideally, this behavior should be built into the form logic, rather than relying on external state tracking.

We appreciate the example you shared—it demonstrates a valid workaround using local state to prevent duplicate submissions. However, what we're looking for is a more integrated solution, where this behavior is encapsulated within the form's render props or its internal logic.

Please let us know if there's a way to achieve this directly within the Form component or if there are any plans to support this functionality natively.

Thanks again, and we look forward to your guidance.

 

ADMIN
Filip
Posted on: 16 Jun 2025 10:02

Hi,

While the formRenderProps currently does not have a built way to track submitting or loading, you can prevent multiple form submissions while the async API call is in progress by tracking the local submit state. I have prepared a runnable example which showcases this approach here:

When selecting the checkbox and submitting the form, the button state will be disabled until the asynchronous submission completes—either successfully or with an error—preventing duplicate submissions during that time.

Please review the approach outlined above and in case this is not what you are looking for let me know and I will gladly assist further in achieving the desired functionality.

Regards,
Filip
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.