Browse Source

fix(nc-gui): handle new formula case

pull/4598/head
Wing-Kam Wong 2 years ago
parent
commit
3d90d2d12f
  1. 15
      packages/nc-gui/components/smartsheet/column/FormulaOptions.vue

15
packages/nc-gui/components/smartsheet/column/FormulaOptions.vue

@ -604,11 +604,16 @@ function scrollToSelectedOption() {
}
// set default value
vModel.value.formula_raw = substituteColumnIdWithAliasInFormula(
(column.value?.colOptions as FormulaType)?.formula,
meta?.value?.columns as ColumnType[],
(column.value?.colOptions as any)?.formula_raw,
)
if ((column.value?.colOptions as any)?.formula_raw) {
vModel.value.formula_raw =
substituteColumnIdWithAliasInFormula(
(column.value?.colOptions as FormulaType)?.formula,
meta?.value?.columns as ColumnType[],
(column.value?.colOptions as any)?.formula_raw,
) || ''
} else {
vModel.value.formula_raw = ''
}
// set additional validations
setAdditionalValidations({

Loading…
Cancel
Save