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

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

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

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

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

Loading…
Cancel
Save