From 7d7a715eda5c3b3159569d0f151e347df81ed54b Mon Sep 17 00:00:00 2001 From: Wing-Kam Wong Date: Thu, 11 Aug 2022 14:42:50 +0800 Subject: [PATCH] fix(gui-v2): hide formula field in form --- packages/nc-gui-v2/components/smartsheet/Form.vue | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/packages/nc-gui-v2/components/smartsheet/Form.vue b/packages/nc-gui-v2/components/smartsheet/Form.vue index 2d2232beca..41e8d8f33c 100644 --- a/packages/nc-gui-v2/components/smartsheet/Form.vue +++ b/packages/nc-gui-v2/components/smartsheet/Form.vue @@ -232,13 +232,17 @@ function setFormData() { } localColumns.value = col - .filter((f: Record) => f.show && f.uidt !== UITypes.Rollup && f.uidt !== UITypes.Lookup) + .filter( + (f: Record) => f.show && f.uidt !== UITypes.Rollup && f.uidt !== UITypes.Lookup && f.uidt !== UITypes.Formula, + ) .sort((a: Record, b: Record) => a.order - b.order) .map((c: Record) => ({ ...c, required: !!(c.required || 0) })) systemFieldsIds.value = getSystemColumns(col).map((c: Record) => c.fk_column_id) - hiddenColumns.value = col.filter((f: Record) => !f.show && !systemFieldsIds.value.includes(f.fk_column_id)) + hiddenColumns.value = col.filter( + (f: Record) => !f.show && !systemFieldsIds.value.includes(f.fk_column_id) && f.uidt !== UITypes.Formula, + ) } function isRequired(_columnObj: Record, required = false) {