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. 11
      packages/nc-gui-v2/pages/[projectType]/[projectId]/index.vue

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

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

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

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

Loading…
Cancel
Save