Browse Source

fix(nc-gui): aggCommentCount type

pull/5269/head
Wing-Kam Wong 2 years ago
parent
commit
75c67e59b8
  1. 4
      packages/nc-gui/composables/useViewData.ts

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

@ -58,7 +58,7 @@ export function useViewData(
const _paginationData = ref<PaginatedType>({ page: 1, pageSize: appInfoDefaultLimit })
const aggCommentCount = ref<{ row_id: string; count: number }[]>([])
const aggCommentCount = ref<{ row_id: string; count: string }[]>([])
const galleryData = ref<GalleryType>()
@ -182,7 +182,7 @@ export function useViewData(
for (const row of formattedData.value) {
const id = extractPkFromRow(row.row, meta.value?.columns as ColumnType[])
row.rowMeta.commentCount = aggCommentCount.value?.find((c: Record<string, any>) => c.row_id === id)?.count || 0
row.rowMeta.commentCount = +(aggCommentCount.value?.find((c: Record<string, any>) => c.row_id === id)?.count || 0)
}
}

Loading…
Cancel
Save