Browse Source

Merge pull request #3247 from nocodb/fix/gui-v2-view-break-issue

fix(gui-v2): view break issue
pull/3254/head
Raju Udava 2 years ago committed by GitHub
parent
commit
a47f88aec9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      packages/nc-gui-v2/components/smartsheet/Grid.vue
  2. 2
      packages/nc-gui-v2/composables/useViewData.ts
  3. 5
      packages/nc-gui-v2/pages/[projectType]/[projectId]/index.vue

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

@ -87,7 +87,6 @@ const {
deleteRow, deleteRow,
deleteSelectedRows, deleteSelectedRows,
selectedAllRecords, selectedAllRecords,
loadAggCommentsCount,
removeLastEmptyRow, removeLastEmptyRow,
} = useViewData(meta, view as any, xWhere) } = useViewData(meta, view as any, xWhere)
@ -106,7 +105,6 @@ provide(ReadonlyInj, !isUIAllowed('xcDatatableEditable'))
reloadViewDataHook?.on(async () => { reloadViewDataHook?.on(async () => {
await loadData() await loadData()
loadAggCommentsCount()
}) })
const expandForm = (row: Row, state?: Record<string, any>) => { const expandForm = (row: Row, state?: Record<string, any>) => {
@ -128,7 +126,7 @@ const selectCell = (row: number, col: number) => {
watch( watch(
() => (view?.value as any)?.id, () => (view?.value as any)?.id,
async (n?: string, o?: string) => { async (n?: string, o?: string) => {
if (n && n !== o) { if (n && o && n !== o) {
await loadData() await loadData()
} }
}, },

2
packages/nc-gui-v2/composables/useViewData.ts

@ -92,7 +92,7 @@ export function useViewData(
return extractPkFromRow(row, meta?.value?.columns as ColumnType[]) return extractPkFromRow(row, meta?.value?.columns as ColumnType[])
}) })
if (!ids?.length) return if (!ids?.length || ids?.some((id) => !id)) return
aggCommentCount.value = await $api.utils.commentCount({ aggCommentCount.value = await $api.utils.commentCount({
ids, ids,

5
packages/nc-gui-v2/pages/[projectType]/[projectId]/index.vue

@ -403,12 +403,11 @@ const onMenuClose = (visible: boolean) => {
<DashboardTreeView v-show="isOpen" /> <DashboardTreeView v-show="isOpen" />
</a-layout-sider> </a-layout-sider>
</template> </template>
<div :key="$route.fullPath">
<dashboard-settings-modal v-model="dialogOpen" :open-key="openDialogKey" /> <dashboard-settings-modal v-model="dialogOpen" :open-key="openDialogKey" />
<NuxtPage /> <NuxtPage />
<GeneralPreviewAs float /> <GeneralPreviewAs float />
</div>
</NuxtLayout> </NuxtLayout>
</template> </template>

Loading…
Cancel
Save