Browse Source

Nc fix/shared view opt query (#8833)

* fix: use opt-query for shared view

* fix: avoid duplicate api call if page size different from default

---------

Co-authored-by: Pranav C <pranavxc@gmail.com>
pull/8840/head
Raju Udava 2 weeks ago committed by GitHub
parent
commit
c747a63971
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 4
      packages/nc-gui/composables/useSharedView.ts
  2. 4
      packages/nc-gui/composables/useViewData.ts
  3. 6
      packages/nocodb/src/services/public-datas.service.ts

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

@ -15,7 +15,7 @@ import { UITypes, ViewTypes } from 'nocodb-sdk'
export function useSharedView() {
const nestedFilters = ref<(FilterType & { status?: 'update' | 'delete' | 'create'; parentId?: string })[]>([])
const { appInfo } = useGlobal()
const { appInfo, gridViewPageSize } = useGlobal()
const baseStore = useBase()
@ -25,7 +25,7 @@ export function useSharedView() {
const { base } = storeToRefs(baseStore)
const appInfoDefaultLimit = appInfo.value.defaultLimit || 25
const appInfoDefaultLimit = gridViewPageSize.value || appInfo.value.defaultLimit || 25
const paginationData = useState<PaginatedType>('paginationData', () => ({
page: 1,

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

@ -31,9 +31,9 @@ export function useViewData(
const route = router.currentRoute
const { appInfo } = useGlobal()
const { appInfo, gridViewPageSize } = useGlobal()
const appInfoDefaultLimit = appInfo.value.defaultLimit || 25
const appInfoDefaultLimit = gridViewPageSize.value || appInfo.value.defaultLimit || 25
const _paginationData = ref<PaginatedType>({ page: 1, pageSize: appInfoDefaultLimit })

6
packages/nocodb/src/services/public-datas.service.ts

@ -1,11 +1,7 @@
import path from 'path';
import { Injectable } from '@nestjs/common';
import { nanoid } from 'nanoid';
import {
populateUniqueFileName,
UITypes,
ViewTypes,
} from 'nocodb-sdk';
import { populateUniqueFileName, UITypes, ViewTypes } from 'nocodb-sdk';
import slash from 'slash';
import { nocoExecute } from 'nc-help';

Loading…
Cancel
Save