Browse Source

fix(nc-gui): wrap LazySmartsheetExpandedForm by Suspense

pull/3563/head
Wing-Kam Wong 2 years ago
parent
commit
83a9de437f
  1. 5
      packages/nc-gui/components/smartsheet/Gallery.vue
  2. 4
      packages/nc-gui/components/smartsheet/Grid.vue
  3. 8
      packages/nc-gui/components/smartsheet/Kanban.vue

5
packages/nc-gui/components/smartsheet/Gallery.vue

@ -251,6 +251,7 @@ watch(view, async (nextView) => {
<LazySmartsheetPagination />
<Suspense>
<LazySmartsheetExpandedForm
v-if="expandedFormRow && expandedFormDlg"
v-model="expandedFormDlg"
@ -258,8 +259,11 @@ watch(view, async (nextView) => {
:state="expandedFormRowState"
:meta="meta"
:view="view"
@update:model-value="!skipRowRemovalOnCancel && removeRowIfNew(expandedFormRow)"
/>
</Suspense>
<Suspense>
<LazySmartsheetExpandedForm
v-if="expandedFormOnRowIdDlg"
:key="route.query.rowId"
@ -269,6 +273,7 @@ watch(view, async (nextView) => {
:row-id="route.query.rowId"
:view="view"
/>
</Suspense>
</div>
</template>

4
packages/nc-gui/components/smartsheet/Grid.vue

@ -556,6 +556,7 @@ watch(
<LazySmartsheetPagination />
<Suspense>
<LazySmartsheetExpandedForm
v-if="expandedFormRow && expandedFormDlg"
v-model="expandedFormDlg"
@ -565,7 +566,9 @@ watch(
:view="view"
@update:model-value="!skipRowRemovalOnCancel && removeRowIfNew(expandedFormRow)"
/>
</Suspense>
<Suspense>
<LazySmartsheetExpandedForm
v-if="expandedFormOnRowIdDlg"
:key="route.query.rowId"
@ -575,6 +578,7 @@ watch(
:row-id="route.query.rowId"
:view="view"
/>
</Suspense>
</div>
</template>

8
packages/nc-gui/components/smartsheet/Kanban.vue

@ -64,7 +64,6 @@ const {
groupingField,
countByStack,
deleteStack,
removeRowFromUncategorizedStack,
shouldScrollToRight,
deleteRow,
} = useKanbanViewStoreOrThrow()
@ -504,15 +503,19 @@ watch(view, async (nextView) => {
<div class="flex-1" />
<Suspense>
<LazySmartsheetExpandedForm
v-if="expandedFormRow && expandedFormDlg"
v-model="expandedFormDlg"
:row="expandedFormRow"
:state="expandedFormRowState"
:meta="meta"
@cancel="removeRowFromUncategorizedStack"
:view="view"
@update:model-value="!skipRowRemovalOnCancel && removeRowIfNew(expandedFormRow)"
/>
</Suspense>
<Suspense>
<LazySmartsheetExpandedForm
v-if="expandedFormOnRowIdDlg"
:key="route.query.rowId"
@ -522,6 +525,7 @@ watch(view, async (nextView) => {
:row-id="route.query.rowId"
:view="view"
/>
</Suspense>
<a-modal v-model:visible="deleteStackVModel" class="!top-[35%]" wrap-class-name="nc-modal-kanban-delete-stack">
<template #title>

Loading…
Cancel
Save