Update Loading State in OpenForm Component

- Changed the loading state binding in `OpenForm.vue` from `form.busy` to `isProcessing` for improved clarity and consistency in the form submission process.
- Introduced a computed property `isProcessing` to derive the loading state from the `formManager`'s state, enhancing the responsiveness of the UI during form interactions.

These changes aim to provide a more intuitive user experience by accurately reflecting the form's processing state during submissions.
This commit is contained in:
JhumanJ 2025-05-19 14:53:30 +02:00
parent 088e76955d
commit f9c734c826
1 changed files with 4 additions and 2 deletions

View File

@ -63,7 +63,7 @@
<slot
v-if="isLastPage"
name="submit-btn"
:loading="form.busy"
:loading="isProcessing"
/>
<open-form-button
v-else-if="currentFieldsPageBreak"
@ -71,7 +71,7 @@
:color="form.color"
:theme="theme"
class="mt-2 px-8 mx-1"
:loading="form.busy"
:loading="isProcessing"
@click.stop="handleNextClick"
>
{{ currentFieldsPageBreak.next_btn_text }}
@ -163,6 +163,8 @@ const handleDragDropped = (data) => {
workingFormStore.moveField(oldTargetIndex, newTargetIndex)
}
}
const isProcessing = computed(() => props.formManager.state.isProcessing)
</script>
<style lang='scss' scoped>