Browse Source

Merge pull request #3484 from nocodb/fix/gui-v2-skip-m2m-formula

fix(gui-v2): skip system LTAR columns
pull/3489/head
Raju Udava 2 years ago committed by GitHub
parent
commit
3eea5a051a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 11
      packages/nc-gui-v2/components/smartsheet-column/FormulaOptions.vue

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

@ -96,10 +96,13 @@ const suggestionsList = computed(() => {
examples: formulas[fn].examples, examples: formulas[fn].examples,
})), })),
...columns.value ...columns.value
.filter( .filter((c: Record<string, any>) => {
(c: Record<string, any>) => // skip system LTAR columns
!column || (column.value.id !== c.id && !(c.uidt === UITypes.LinkToAnotherRecord && c.system === 1)), 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) => ({ .map((c: any) => ({
text: c.title, text: c.title,
type: 'column', type: 'column',

Loading…
Cancel
Save