tsv2-library 1.0.61-beta.73 → 1.0.61-beta.74

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.
@@ -68444,7 +68444,10 @@ const _sfc_main$z = /* @__PURE__ */ defineComponent({
68444
68444
  }
68445
68445
  });
68446
68446
  const { handleSubmit, values, resetForm, errors, setErrors, setFieldError } = useForm$1();
68447
- const isSubmitting = shallowRef(false);
68447
+ const isSubmitting = inject(
68448
+ "isSubmitting",
68449
+ shallowRef(false)
68450
+ );
68448
68451
  provide("isSubmitting", isSubmitting);
68449
68452
  const formState = shallowRef("submit");
68450
68453
  const formElement = ref();
@@ -68698,6 +68701,8 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
68698
68701
  const props = __props;
68699
68702
  const emit = __emit;
68700
68703
  const slots = useSlots();
68704
+ const isSubmitting = shallowRef(false);
68705
+ provide("isSubmitting", isSubmitting);
68701
68706
  const form = ref();
68702
68707
  const dialogForm = ref();
68703
68708
  const fieldsKey = ref(0);
@@ -68715,9 +68720,14 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
68715
68720
  emit("update:visible", false);
68716
68721
  emit("close");
68717
68722
  };
68718
- const onButtonSubmitClicked = () => {
68723
+ const onButtonSubmitClicked = async () => {
68719
68724
  if (form.value && !props.invalid && !props.validatorMessage) {
68720
- form.value.submit();
68725
+ isSubmitting.value = true;
68726
+ try {
68727
+ await form.value.submit();
68728
+ } finally {
68729
+ isSubmitting.value = false;
68730
+ }
68721
68731
  }
68722
68732
  };
68723
68733
  const clearField = () => {