Browse Source

Merge pull request #3181 from nocodb/fix/3177-excessive-requests

fix: avoid excessive requests related to LTAR
pull/3192/head
աɨռɢӄաօռɢ 2 years ago committed by GitHub
parent
commit
82e59614ca
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      packages/nc-gui-v2/components/cell/Json.vue
  2. 8
      packages/nc-gui-v2/components/virtual-cell/HasMany.vue
  3. 4
      packages/nc-gui-v2/components/virtual-cell/ManyToMany.vue
  4. 2
      packages/nc-gui-v2/components/virtual-cell/components/ItemChip.vue
  5. 2
      packages/nc-gui-v2/components/virtual-cell/components/ListChildItems.vue

1
packages/nc-gui-v2/components/cell/Json.vue

@ -41,7 +41,6 @@ const localValue = computed<string | Record<string, any> | undefined>({
},
})
const clear = () => {
error = undefined

8
packages/nc-gui-v2/components/virtual-cell/HasMany.vue

@ -49,9 +49,9 @@ await loadRelatedTableMeta()
const localCellValue = computed(() => {
if (cellValue?.value) {
return cellValue?.value
return cellValue?.value ?? []
} else if (isNew.value) {
return state?.value?.[column?.value.title as string]
return state?.value?.[column?.value.title as string] ?? []
}
return []
})
@ -83,8 +83,8 @@ const unlinkRef = async (rec: Record<string, any>) => {
<div class="chips flex align-center img-container flex-grow hm-items flex-nowrap min-w-0 overflow-hidden">
<template v-if="cells">
<ItemChip v-for="(cell, i) of cells" :key="i" :item="cell.item" :value="cell.value" @unlink="unlinkRef(cell.item)" />
<span v-if="cellValue?.length === 10" class="caption pointer ml-1 grey--text" @click="childListDlg = true"
>more...
<span v-if="cellValue?.length === 10" class="caption pointer ml-1 grey--text" @click="childListDlg = true">
more...
</span>
</template>
</div>

4
packages/nc-gui-v2/components/virtual-cell/ManyToMany.vue

@ -49,9 +49,9 @@ await loadRelatedTableMeta()
const localCellValue = computed(() => {
if (cellValue?.value) {
return cellValue?.value
return cellValue?.value ?? []
} else if (isNew.value) {
return state?.value?.[column?.value.title as string]
return state?.value?.[column?.value.title as string] ?? []
}
return []
})

2
packages/nc-gui-v2/components/virtual-cell/components/ItemChip.vue

@ -43,7 +43,7 @@ export default {
<Suspense>
<ExpandedForm
v-if="!readonly"
v-if="!readonly && expandedFormDlg"
v-model="expandedFormDlg"
:row="{ row: item }"
:meta="relatedTableMeta"

2
packages/nc-gui-v2/components/virtual-cell/components/ListChildItems.vue

@ -145,7 +145,7 @@ const expandedFormRow = ref()
<Suspense>
<ExpandedForm
v-if="expandedFormRow"
v-if="expandedFormRow && expandedFormDlg"
v-model="expandedFormDlg"
:row="{ row: expandedFormRow }"
:meta="relatedTableMeta"

Loading…
Cancel
Save