@douglasneuroinformatics/libui 3.8.1 → 3.8.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -3483,14 +3483,16 @@ var Form = ({
3483
3483
  }
3484
3484
  };
3485
3485
  const handleSubmit = async (event) => {
3486
- const minSubmitTime = new Promise((resolve) => setTimeout(resolve, 500));
3486
+ const minSubmitTime = new Promise(
3487
+ (resolve) => suspendWhileSubmitting ? setTimeout(resolve, 500) : resolve()
3488
+ );
3487
3489
  try {
3488
3490
  setIsSubmitting(true);
3489
3491
  event.preventDefault();
3490
3492
  const result = await validationSchema.safeParseAsync(values);
3491
3493
  if (result.success) {
3492
- reset();
3493
3494
  await onSubmit(result.data);
3495
+ reset();
3494
3496
  } else {
3495
3497
  console.error(result.error.issues);
3496
3498
  handleError(result.error);