Browse Source

fix(gui-v2): id of undefined in formula

pull/3049/head
Wing-Kam Wong 2 years ago
parent
commit
f31f92ad47
  1. 4
      packages/nc-gui-v2/components/smartsheet-column/FormulaOptions.vue

4
packages/nc-gui-v2/components/smartsheet-column/FormulaOptions.vue

@ -93,7 +93,7 @@ const suggestionsList = computed(() => {
...columns.value ...columns.value
.filter( .filter(
(c: Record<string, any>) => (c: Record<string, any>) =>
!column || (column.id !== c.id && !(c.uidt === UITypes.LinkToAnotherRecord && c.system === 1)), !column || (column.value.id !== c.id && !(c.uidt === UITypes.LinkToAnotherRecord && c.system === 1)),
) )
.map((c: any) => ({ .map((c: any) => ({
text: c.title, text: c.title,
@ -257,7 +257,7 @@ function validateAgainstMeta(parsedTree: any, errors = new Set(), typeErrors = n
const targetFormulaCol = columns.value.find((c: ColumnType) => c.title === parsedTree.name && c.uidt === UITypes.Formula) const targetFormulaCol = columns.value.find((c: ColumnType) => c.title === parsedTree.name && c.uidt === UITypes.Formula)
if (targetFormulaCol) { if (targetFormulaCol) {
formulaPaths.push({ formulaPaths.push({
[column.id]: [targetFormulaCol.id], [column?.value?.id as string]: [targetFormulaCol.id],
}) })
} }
const vertices = formulaPaths.length const vertices = formulaPaths.length

Loading…
Cancel
Save