-
{{ FOO.paginationData.value.totalRows }} records
+
-
\ No newline at end of file
+
diff --git a/packages/nc-gui/composables/useMapViewDataStore.ts b/packages/nc-gui/composables/useMapViewDataStore.ts
index b226b35e46..6a2993e02d 100644
--- a/packages/nc-gui/composables/useMapViewDataStore.ts
+++ b/packages/nc-gui/composables/useMapViewDataStore.ts
@@ -13,14 +13,12 @@ const formatData = (list: Row[]) =>
rowMeta: {},
}))
-const { appInfo } = $(useGlobal())
-
const appInfoDefaultLimit = 1000
const paginationData = ref
({ page: 1, pageSize: appInfoDefaultLimit })
const [useProvideMapViewStore, useMapViewStore] = useInjectionState(
(
- meta: Ref,
+ meta: Ref,
viewMeta: Ref | ComputedRef<(ViewType & { id: string }) | undefined>,
where?: ComputedRef,
) => {
@@ -36,6 +34,10 @@ const [useProvideMapViewStore, useMapViewStore] = useInjectionState(
const geoDataFieldColumn = ref()
+ const view = inject(ActiveViewInj)
+
+ const { syncCount } = useViewData(meta, view!)
+
const queryParams = computed(() => ({
// offset: ((paginationData.value.page ?? 0) - 1) * (paginationData.value.pageSize ?? appInfoDefaultLimit),
limit: paginationData.value.pageSize ?? appInfoDefaultLimit,
@@ -54,12 +56,11 @@ const [useProvideMapViewStore, useMapViewStore] = useInjectionState(
const res = await api.dbViewRow.list('noco', project.value.id!, meta.value!.id!, viewMeta.value!.id!, {
...queryParams.value,
- // ...params,
- // ...(isUIAllowed('sortSync') ? {} : { sortArrJson: JSON.stringify(sorts.value) }),
- // ...(isUIAllowed('filterSync') ? {} : { filterArrJson: JSON.stringify(nestedFilters.value) }),
where: where?.value,
})
+ syncCount()
+
formattedData.value = formatData(res.list)
}
@@ -108,6 +109,8 @@ const [useProvideMapViewStore, useMapViewStore] = useInjectionState(
oldRow: { ...insertedData },
})
+ syncCount()
+
return insertedData
} catch (error: any) {
message.error(await extractSdkResponseErrorMsg(error))