Browse Source

fix: load aggregations only on grid view (#9030)

Co-authored-by: DarkPhoenix2704 <anbarasun123@gmail.com>
pull/9031/head
Raju Udava 5 months ago committed by GitHub
parent
commit
021558d0da
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 12
      packages/nc-gui/composables/useViewAggregate.ts

12
packages/nc-gui/composables/useViewAggregate.ts

@ -1,5 +1,13 @@
import type { Ref } from 'vue'
import { type ColumnType, CommonAggregations, type TableType, UITypes, type ViewType, getAvailableAggregations } from 'nocodb-sdk'
import {
type ColumnType,
CommonAggregations,
type TableType,
UITypes,
type ViewType,
ViewTypes,
getAvailableAggregations,
} from 'nocodb-sdk'
const [useProvideViewAggregate, useViewAggregate] = useInjectionState(
(
@ -77,6 +85,8 @@ const [useProvideViewAggregate, useViewAggregate] = useInjectionState(
timeout: 10000,
})
.then(async () => {
if (!view.value?.type || view.value?.type !== ViewTypes.GRID) return
try {
const data = !isPublic.value
? await api.dbDataTableAggregate.dbDataTableAggregate(meta.value.id, {

Loading…
Cancel
Save