Browse Source

fix: wire up shouldShowLoading (#8370)

* fix: wire up shouldShowLoading

* chore: bump ioredis version

Signed-off-by: mertmit <mertmit99@gmail.com>

---------

Signed-off-by: mertmit <mertmit99@gmail.com>
pull/8384/head
Mert E 7 months ago committed by GitHub
parent
commit
0373152157
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 6
      packages/nc-gui/components/smartsheet/grid/Table.vue
  2. 4
      packages/nc-gui/composables/useViewData.ts
  3. 2
      packages/nocodb/package.json
  4. 65
      pnpm-lock.yaml

6
packages/nc-gui/components/smartsheet/grid/Table.vue

@ -60,7 +60,7 @@ import type { CellRange, Row } from '#imports'
const props = defineProps<{
data: Row[]
paginationData?: PaginatedType
loadData?: (params?: any) => Promise<void>
loadData?: (params?: any, shouldShowLoading?: boolean) => Promise<void>
changePage?: (page: number) => void
callAddEmptyRow?: (addAfter?: number) => Row | undefined
deleteRow?: (rowIndex: number, undo?: boolean) => Promise<void>
@ -1339,7 +1339,7 @@ eventBus.on(async (event, payload) => {
})
async function reloadViewDataHandler(params: void | { shouldShowLoading?: boolean | undefined; offset?: number | undefined }) {
isViewDataLoading.value = true
if (params?.shouldShowLoading) isViewDataLoading.value = true
if (predictedNextColumn.value?.length) {
const fieldsAvailable = meta.value?.columns?.map((c) => c.title)
@ -1350,7 +1350,7 @@ async function reloadViewDataHandler(params: void | { shouldShowLoading?: boolea
keepNewRecords: true,
})
await loadData?.({ ...(params?.offset !== undefined ? { offset: params.offset } : {}) })
await loadData?.({ ...(params?.offset !== undefined ? { offset: params.offset } : {}) }, params?.shouldShowLoading)
if (temporaryNewRowStore.value.length) {
dataRef.value.push(...temporaryNewRowStore.value)

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

@ -177,7 +177,7 @@ export function useViewData(
const controller = ref()
async function loadData(params: Parameters<Api<any>['dbViewRow']['list']>[4] = {}) {
async function loadData(params: Parameters<Api<any>['dbViewRow']['list']>[4] = {}, shouldShowLoading = true) {
if ((!base?.value?.id || !metaId.value || !viewMeta.value?.id) && !isPublic.value) return
if (controller.value) {
@ -188,7 +188,7 @@ export function useViewData(
controller.value = CancelToken.source()
isPaginationLoading.value = true
if (shouldShowLoading) isPaginationLoading.value = true
let response
try {

2
packages/nocodb/package.json

@ -109,7 +109,7 @@
"html-to-json-parser": "^2.0.1",
"import-fresh": "^3.3.0",
"inflection": "^1.13.4",
"ioredis": "^5.3.2",
"ioredis": "^5.4.1",
"ioredis-mock": "^8.9.0",
"is-docker": "^2.2.1",
"isomorphic-dompurify": "^1.13.0",

65
pnpm-lock.yaml

@ -125,7 +125,7 @@ importers:
version: 6.6.2
httpsnippet:
specifier: ^2.0.0
version: 2.0.0(mkdirp@3.0.1)
version: 2.0.0(mkdirp@2.1.6)
jsbarcode:
specifier: ^3.11.6
version: 3.11.6
@ -617,11 +617,11 @@ importers:
specifier: ^1.13.4
version: 1.13.4
ioredis:
specifier: ^5.3.2
version: 5.3.2
specifier: ^5.4.1
version: 5.4.1
ioredis-mock:
specifier: ^8.9.0
version: 8.9.0(@types/ioredis-mock@8.2.5)(ioredis@5.3.2)
version: 8.9.0(@types/ioredis-mock@8.2.5)(ioredis@5.4.1)
is-docker:
specifier: ^2.2.1
version: 2.2.1
@ -699,7 +699,7 @@ importers:
version: 1.0.6(debug@4.3.4)(kafkajs@2.2.4)(reflect-metadata@0.2.1)
nestjs-throttler-storage-redis:
specifier: ^0.4.4
version: 0.4.4(@nestjs/common@10.3.7)(@nestjs/core@10.3.7)(@nestjs/throttler@5.1.2)(ioredis@5.3.2)(reflect-metadata@0.2.1)
version: 0.4.4(@nestjs/common@10.3.7)(@nestjs/core@10.3.7)(@nestjs/throttler@5.1.2)(ioredis@5.4.1)(reflect-metadata@0.2.1)
nocodb-sdk:
specifier: workspace:^
version: link:../nocodb-sdk
@ -12243,7 +12243,7 @@ packages:
dependencies:
cron-parser: 4.9.0
get-port: 5.1.1
ioredis: 5.3.2
ioredis: 5.4.1
lodash: 4.17.21
msgpackr: 1.10.1
semver: 7.5.4
@ -12258,7 +12258,7 @@ packages:
cron-parser: 4.9.0
get-port: 6.1.2
glob: 8.1.0
ioredis: 5.3.2
ioredis: 5.4.1
lodash: 4.17.21
msgpackr: 1.9.7
semver: 7.5.4
@ -16243,11 +16243,11 @@ packages:
graceful-fs: 4.2.11
dev: false
/fs-writefile-promise@1.0.3(mkdirp@3.0.1):
/fs-writefile-promise@1.0.3(mkdirp@2.1.6):
resolution: {integrity: sha512-yI+wDwj0FsgX7tyIQJR+EP60R64evMSixtGb9AzGWjJVKlF5tCet95KomfqGBg/aIAG1Dhd6wjCOQe5HbX/qLA==}
engines: {node: '>=0.10'}
dependencies:
mkdirp-promise: 1.1.0(mkdirp@3.0.1)
mkdirp-promise: 1.1.0(mkdirp@2.1.6)
pinkie-promise: 1.0.0
transitivePeerDependencies:
- mkdirp
@ -17257,7 +17257,7 @@ packages:
transitivePeerDependencies:
- supports-color
/httpsnippet@2.0.0(mkdirp@3.0.1):
/httpsnippet@2.0.0(mkdirp@2.1.6):
resolution: {integrity: sha512-Hb2ttfB5OhasYxwChZ8QKpYX3v4plNvwMaMulUIC7M3RHRDf1Op6EMp47LfaU2sgQgfvo5spWK4xRAirMEisrg==}
engines: {node: '>=10'}
hasBin: true
@ -17268,7 +17268,7 @@ packages:
event-stream: 3.3.4
form-data: 3.0.0
fs-readfile-promise: 2.0.1
fs-writefile-promise: 1.0.3(mkdirp@3.0.1)
fs-writefile-promise: 1.0.3(mkdirp@2.1.6)
har-validator: 5.1.5
stringify-object: 3.3.0
transitivePeerDependencies:
@ -17535,7 +17535,7 @@ packages:
engines: {node: '>=8'}
dev: false
/ioredis-mock@8.9.0(@types/ioredis-mock@8.2.5)(ioredis@5.3.2):
/ioredis-mock@8.9.0(@types/ioredis-mock@8.2.5)(ioredis@5.4.1):
resolution: {integrity: sha512-yIglcCkI1lvhwJVoMsR51fotZVsPsSk07ecTCgRTRlicG0Vq3lke6aAaHklyjmRNRsdYAgswqC2A0bPtQK4LSw==}
engines: {node: '>=12.22'}
peerDependencies:
@ -17547,26 +17547,10 @@ packages:
'@types/ioredis-mock': 8.2.5
fengari: 0.1.4
fengari-interop: 0.1.3(fengari@0.1.4)
ioredis: 5.3.2
ioredis: 5.4.1
semver: 7.5.4
dev: false
/ioredis@5.3.2:
resolution: {integrity: sha512-1DKMMzlIHM02eBBVOFQ1+AolGjs6+xEcM4PDL7NqOS6szq7H9jSaEkIUH6/a5Hl241LzW6JLSiAbNvTQjUupUA==}
engines: {node: '>=12.22.0'}
dependencies:
'@ioredis/commands': 1.2.0
cluster-key-slot: 1.1.2
debug: 4.3.4(supports-color@5.5.0)
denque: 2.1.0
lodash.defaults: 4.2.0
lodash.isarguments: 3.1.0
redis-errors: 1.2.0
redis-parser: 3.0.0
standard-as-callback: 2.1.0
transitivePeerDependencies:
- supports-color
/ioredis@5.4.1:
resolution: {integrity: sha512-2YZsvl7jopIa1gaePkeMtd9rAcSjOOjPtpcLlOeusyO+XH2SK5ZcT+UCrElPP+WVIInh2TzeI4XW9ENaSLVVHA==}
engines: {node: '>=12.22.0'}
@ -17582,7 +17566,6 @@ packages:
standard-as-callback: 2.1.0
transitivePeerDependencies:
- supports-color
dev: false
/ip@2.0.0:
resolution: {integrity: sha512-WKa+XuLG1A1R0UWhl2+1XQSi+fZWMsYKffMZTTYsiZaUD8k2yDAj5atimTUD2TZkyCkNEeYE5NhFZmupOGtjYQ==}
@ -20208,14 +20191,14 @@ packages:
requiresBuild: true
dev: false
/mkdirp-promise@1.1.0(mkdirp@3.0.1):
/mkdirp-promise@1.1.0(mkdirp@2.1.6):
resolution: {integrity: sha512-xzB0UZFcW1UGS2xkXeDh39jzTP282lb3Vwp4QzCQYmkTn4ysaV5dBdbkOXmhkcE1TQlZebQlgTceaWvDr3oFgw==}
engines: {node: '>=4'}
deprecated: This package is broken and no longer maintained. 'mkdirp' itself supports promises now, please switch to that.
peerDependencies:
mkdirp: '>=0.5.0'
dependencies:
mkdirp: 3.0.1
mkdirp: 2.1.6
dev: false
/mkdirp@0.5.6:
@ -20235,12 +20218,6 @@ packages:
hasBin: true
dev: false
/mkdirp@3.0.1:
resolution: {integrity: sha512-+NsyUUAZDmo6YVHzL/stxSu3t9YS1iljliy3BSDrXJ/dkn1KYdmtZODGGjLcc9XLgVVpH4KshHB8XmZgMhaBXg==}
engines: {node: '>=10'}
hasBin: true
dev: false
/mlly@1.5.0:
resolution: {integrity: sha512-NPVQvAY1xr1QoVeG0cy8yUYC7FQcOx6evl/RjT1wL5FvzPnzOysoqB/jmx/DhssT2dYa8nxECLAaFI/+gVLhDQ==}
dependencies:
@ -20601,7 +20578,7 @@ packages:
- reflect-metadata
dev: false
/nestjs-throttler-storage-redis@0.4.4(@nestjs/common@10.3.7)(@nestjs/core@10.3.7)(@nestjs/throttler@5.1.2)(ioredis@5.3.2)(reflect-metadata@0.2.1):
/nestjs-throttler-storage-redis@0.4.4(@nestjs/common@10.3.7)(@nestjs/core@10.3.7)(@nestjs/throttler@5.1.2)(ioredis@5.4.1)(reflect-metadata@0.2.1):
resolution: {integrity: sha512-QLYfsat/qutHQaTn3QAoa79WEHG4Uyk8rWRqNhVCVxzQ+qdzaNBUlBwxb8MYhfCmgoCA+eX3Paws8FZI/bYe7A==}
peerDependencies:
'@nestjs/common': ^7.0.0 || ^8.0.0 || ^9.0.0 || ^10.0.0
@ -20613,7 +20590,7 @@ packages:
'@nestjs/common': 10.3.7(reflect-metadata@0.2.1)(rxjs@7.8.1)
'@nestjs/core': 10.3.7(@nestjs/common@10.3.7)(@nestjs/platform-express@10.3.7)(@nestjs/websockets@10.3.7)(reflect-metadata@0.2.1)(rxjs@7.8.1)
'@nestjs/throttler': 5.1.2(@nestjs/common@10.3.7)(@nestjs/core@10.3.7)(reflect-metadata@0.2.1)
ioredis: 5.3.2
ioredis: 5.4.1
reflect-metadata: 0.2.1
dev: false
@ -24396,6 +24373,9 @@ packages:
/sqlite3@5.1.6:
resolution: {integrity: sha512-olYkWoKFVNSSSQNvxVUfjiVbz3YtBwTJj+mfV5zpHmqW3sELx2Cf4QCdirMelhM5Zh+KDVaKgQHqCxrqiWHybw==}
requiresBuild: true
peerDependenciesMeta:
node-gyp:
optional: true
dependencies:
'@mapbox/node-pre-gyp': 1.0.11
node-addon-api: 4.3.0
@ -24410,6 +24390,9 @@ packages:
/sqlite3@5.1.7:
resolution: {integrity: sha512-GGIyOiFaG+TUra3JIfkI/zGP8yZYLPQ0pl1bH+ODjiX57sPhrLU5sQJn1y9bDKZUFYkX1crlrPfSYt0BKKdkog==}
requiresBuild: true
peerDependenciesMeta:
node-gyp:
optional: true
dependencies:
bindings: 1.5.0
node-addon-api: 7.0.0
@ -26115,7 +26098,7 @@ packages:
chokidar: 3.6.0
destr: 2.0.3
h3: 1.10.1
ioredis: 5.3.2
ioredis: 5.4.1
listhen: 1.6.0
lru-cache: 10.0.3
mri: 1.2.0

Loading…
Cancel
Save