From b0627ff2c156857eef0072fd40d4f028ad469977 Mon Sep 17 00:00:00 2001 From: Wing-Kam Wong Date: Sun, 4 Sep 2022 22:25:53 +0800 Subject: [PATCH] fix(gui-v2): skip system LTAR columns --- .../components/smartsheet-column/FormulaOptions.vue | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/packages/nc-gui-v2/components/smartsheet-column/FormulaOptions.vue b/packages/nc-gui-v2/components/smartsheet-column/FormulaOptions.vue index ba57f2d5bf..0e06220b66 100644 --- a/packages/nc-gui-v2/components/smartsheet-column/FormulaOptions.vue +++ b/packages/nc-gui-v2/components/smartsheet-column/FormulaOptions.vue @@ -96,10 +96,13 @@ const suggestionsList = computed(() => { examples: formulas[fn].examples, })), ...columns.value - .filter( - (c: Record) => - !column || (column.value.id !== c.id && !(c.uidt === UITypes.LinkToAnotherRecord && c.system === 1)), - ) + .filter((c: Record) => { + // skip system LTAR columns + if (c.uidt === UITypes.LinkToAnotherRecord && c.system) return false + // v1 logic? skip the current column + if (!column) return true + return column.value.id !== c.id + }) .map((c: any) => ({ text: c.title, type: 'column',