Skip to content

πŸ”₯ πŸ”₯ πŸ”₯ A Free & Self-hostable Airtable Alternative

fix: review changes

DarkPhoenix270456c203cc98b3
diff --git a/packages/nc-gui/composables/useInfiniteData.ts b/packages/nc-gui/composables/useInfiniteData.ts
index 0c987e7029..99ce40cbff 100644
--- a/packages/nc-gui/composables/useInfiniteData.ts
+++ b/packages/nc-gui/composables/useInfiniteData.ts
@@ -1884,32 +1884,35 @@ export function useInfiniteData(args: {
const dataCache = getDataCache(path)
const whereFilter = await callbacks?.getWhereFilter?.(path)
- const filterArrJson = (await callbacks?.getWhereFilterArr?.(path)) ?? []
+ const jsonWhereFilterArr = (await callbacks?.getWhereFilterArr?.(path)) ?? []
try {
const { count } = isPublic?.value
? await fetchCount({
- filtersArr: nestedFilters.value,
+ filtersArr: [...(nestedFilters.value || []), ...jsonWhereFilterArr],
where: whereFilter,
})
: await $api.dbViewRow.count(NOCO, base?.value?.id as string, meta.value!.id as string, viewMeta?.value?.id as string, {
where: whereFilter,
...(isUIAllowed('filterSync')
- ? { filterArrJson: stringifyFilterOrSortArr(filterArrJson) }
- : { filterArrJson: stringifyFilterOrSortArr([...(nestedFilters.value ?? []), ...filterArrJson]) }),
+ ? { filterArrJson: stringifyFilterOrSortArr(jsonWhereFilterArr) }
+ : { filterArrJson: stringifyFilterOrSortArr([...(nestedFilters.value || []), ...jsonWhereFilterArr]) }),
})
if (fetchTotalRowsWithSearchQuery.value) {
const { count: _count } = isPublic?.value
? await fetchCount({
- filtersArr: nestedFilters.value,
+ filtersArr: [...(nestedFilters.value || []), ...jsonWhereFilterArr],
where: whereQueryFromUrl.value as string,
})
: await $api.dbViewRow.count(NOCO, base?.value?.id as string, meta.value!.id as string, viewMeta?.value?.id as string, {
where: whereQueryFromUrl.value as string,
- ...(isUIAllowed('filterSync') ? {} : { filterArrJson: stringifyFilterOrSortArr(nestedFilters.value) }),
+ ...(isUIAllowed('filterSync')
+ ? {
+ filterArrJson: stringifyFilterOrSortArr(jsonWhereFilterArr),
+ }
+ : { filterArrJson: stringifyFilterOrSortArr([...(nestedFilters.value || []), ...jsonWhereFilterArr]) }),
})
-
if (!disableSmartsheet && !path.length && blockExternalSourceRecordVisibility(isExternalSource.value)) {
totalRowsWithoutSearchQuery.value = Math.max(Math.min(200, _count as number), _count as number)
} else {