From f8ec82dac6fbf9690cbbddb6bd883e8331f2fc5f Mon Sep 17 00:00:00 2001 From: DarkPhoenix2704 Date: Sat, 28 Oct 2023 05:58:23 +0000 Subject: [PATCH] fix(nc-gui): new select options doesn't get saved on duplicate --- .../components/smartsheet/column/SelectOptions.vue | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/packages/nc-gui/components/smartsheet/column/SelectOptions.vue b/packages/nc-gui/components/smartsheet/column/SelectOptions.vue index d834c586d0..e9206cdd5a 100644 --- a/packages/nc-gui/components/smartsheet/column/SelectOptions.vue +++ b/packages/nc-gui/components/smartsheet/column/SelectOptions.vue @@ -120,12 +120,6 @@ onMounted(() => { } }) -const optionChanged = (changedId: string) => { - if (changedId && changedId === defaultOption.value?.id) { - vModel.value.cdf = defaultOption.value.title - } -} - const getNextColor = () => { let tempColor = colors.value[0] if (options.value.length && options.value[options.value.length - 1].color) { @@ -191,6 +185,13 @@ const removeRenderedOption = (index: number) => { } } +const optionChanged = (changedId: string) => { + if (changedId && changedId === defaultOption.value?.id) { + vModel.value.cdf = defaultOption.value.title + } + syncOptions() +} + const undoRemoveRenderedOption = (index: number) => { renderedOptions.value[index].status = undefined syncOptions()