Browse Source

fix: show only tables within same base as child table for LTAR

Signed-off-by: mertmit <mertmit99@gmail.com>
pull/3573/head
mertmit 2 years ago
parent
commit
121c4ed71c
  1. 2
      packages/nc-gui/components/smartsheet/column/LinkedToAnotherRecordOptions.vue
  2. 2
      packages/nc-gui/components/smartsheet/column/LookupOptions.vue
  3. 8
      packages/nc-gui/components/smartsheet/column/RollupOptions.vue

2
packages/nc-gui/components/smartsheet/column/LinkedToAnotherRecordOptions.vue

@ -44,7 +44,7 @@ const refTables = $computed(() => {
return []
}
return tables.filter((t) => t.type === ModelTypes.TABLE)
return tables.filter((t) => t.type === ModelTypes.TABLE && t.base_id === meta?.base_id)
})
const filterOption = (value: string, option: { key: string }) => option.key.toLowerCase().includes(value.toLowerCase())

2
packages/nc-gui/components/smartsheet/column/LookupOptions.vue

@ -34,7 +34,7 @@ const refTables = $computed(() => {
}
const _refTables = meta.columns
.filter((column) => column.uidt === UITypes.LinkToAnotherRecord && !column.system)
.filter((column) => column.uidt === UITypes.LinkToAnotherRecord && !column.system && column.base_id === meta?.base_id)
.map((column) => ({
col: column.colOptions,
column,

8
packages/nc-gui/components/smartsheet/column/RollupOptions.vue

@ -47,7 +47,13 @@ const refTables = $computed(() => {
}
const _refTables = meta.columns
.filter((c) => c.uidt === UITypes.LinkToAnotherRecord && (c.colOptions as LinkToAnotherRecordType).type !== 'bt' && !c.system)
.filter(
(c) =>
c.uidt === UITypes.LinkToAnotherRecord &&
(c.colOptions as LinkToAnotherRecordType).type !== 'bt' &&
!c.system &&
c.base_id === meta?.base_id,
)
.map((c) => ({
col: c.colOptions,
column: c,

Loading…
Cancel
Save