From ac98dd7752cceb6cd47fce151179d98bddfb95ca Mon Sep 17 00:00:00 2001 From: Pranav C Date: Sun, 6 Oct 2024 07:21:36 +0000 Subject: [PATCH] fix: reactivity issue with array push --- .../nc-gui/components/smartsheet/details/Fields.vue | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/packages/nc-gui/components/smartsheet/details/Fields.vue b/packages/nc-gui/components/smartsheet/details/Fields.vue index 59304a0951..48e9128fc5 100644 --- a/packages/nc-gui/components/smartsheet/details/Fields.vue +++ b/packages/nc-gui/components/smartsheet/details/Fields.vue @@ -421,10 +421,13 @@ const onFieldDelete = (state: TableExplorerColumn) => { field.column = state } } else { - ops.value.push({ - op: 'delete', - column: state, - }) + ops.value = [ + ...ops.value, + { + op: 'delete', + column: state, + }, + ] } } @@ -440,7 +443,7 @@ const onFieldAdd = (state: TableExplorerColumn) => { op: 'add', column: state, }) - newFields.value.push(state) + newFields.value = [...newFields.value, state] if (addFieldMoveHook.value) { moveOps.value.push({