From 6d3bc801ce84e133c15be35b97e879c8fe4c8dd0 Mon Sep 17 00:00:00 2001 From: Ramesh Mane <101566080+rameshmane7218@users.noreply.github.com> Date: Mon, 8 Jan 2024 08:42:20 +0000 Subject: [PATCH] fix: multifield editor on click field status update issues --- .../components/smartsheet/details/Fields.vue | 23 +++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/packages/nc-gui/components/smartsheet/details/Fields.vue b/packages/nc-gui/components/smartsheet/details/Fields.vue index 9416c5f6c5..85ea412fdb 100644 --- a/packages/nc-gui/components/smartsheet/details/Fields.vue +++ b/packages/nc-gui/components/smartsheet/details/Fields.vue @@ -280,20 +280,20 @@ const onFieldUpdate = (state: TableExplorerColumn) => { switch (col?.uidt) { case UITypes.QrCode: - if (Object.keys(diffs).length === 1 && col?.colOptions?.fk_qr_value_column_id === state?.fk_qr_value_column_id) { + if (Object.keys(diffs).length === 1 && col?.colOptions?.fk_qr_value_column_id === diffs?.fk_qr_value_column_id) { isUpdated = false } break case UITypes.Barcode: - if (Object.keys(diffs).length === 1 && col?.colOptions?.fk_barcode_value_column_id === state?.fk_barcode_value_column_id) { + if (Object.keys(diffs).length === 1 && col?.colOptions?.fk_barcode_value_column_id === diffs?.fk_barcode_value_column_id) { isUpdated = false } break case UITypes.Lookup: if ( Object.keys(diffs).length === 2 && - col?.colOptions?.fk_lookup_column_id === state?.fk_lookup_column_id && - col?.colOptions?.fk_relation_column_id === state?.fk_relation_column_id + col?.colOptions?.fk_lookup_column_id === diffs?.fk_lookup_column_id && + col?.colOptions?.fk_relation_column_id === diffs?.fk_relation_column_id ) { isUpdated = false } @@ -309,6 +309,21 @@ const onFieldUpdate = (state: TableExplorerColumn) => { isUpdated = false } break + case UITypes.Formula: + if (Object.keys(diffs).length === 1 && col?.colOptions?.formula_raw === diffs?.formula_raw) { + isUpdated = false + } + break + case UITypes.Rollup: + if ( + Object.keys(diffs).length === 3 && + col?.colOptions?.fk_relation_column_id === diffs?.fk_relation_column_id && + col?.colOptions?.fk_rollup_column_id === diffs?.fk_rollup_column_id && + col?.colOptions?.rollup_function === diffs?.rollup_function + ) { + isUpdated = false + } + break } if (Object.keys(diffs).length === 0 || (Object.keys(diffs).length === 1 && 'altered' in diffs) || !isUpdated) {