Browse Source

fix(gui): load comments count only in grid

Signed-off-by: Pranav C <pranavxc@gmail.com>
pull/3655/head
Pranav C 2 years ago
parent
commit
bdbf0c13ad
  1. 1
      packages/nc-gui/components/virtual-cell/components/ListChildItems.vue
  2. 5
      packages/nc-gui/composables/useViewData.ts

1
packages/nc-gui/components/virtual-cell/components/ListChildItems.vue

@ -78,6 +78,7 @@ const container = computed(() =>
const expandedFormDlg = ref(false)
const expandedFormRow = ref()
/** reload children list whenever cell value changes and list is visible */
watch(
() => props.cellValue,
() => {

5
packages/nc-gui/composables/useViewData.ts

@ -1,3 +1,4 @@
import { ViewTypes } from 'nocodb-sdk'
import type { Api, ColumnType, FormType, GalleryType, PaginatedType, TableType, ViewType } from 'nocodb-sdk'
import type { ComputedRef, Ref } from 'vue'
import { message } from 'ant-design-vue'
@ -174,7 +175,9 @@ export function useViewData(
: await fetchSharedViewData()
formattedData.value = formatData(response.list)
paginationData.value = response.pageInfo
await loadAggCommentsCount()
if (viewMeta.value?.type === ViewTypes.GRID) {
await loadAggCommentsCount()
}
}
async function loadGalleryData() {

Loading…
Cancel
Save