From fe02007f5af57404dc1873f356fde0ffe03293b5 Mon Sep 17 00:00:00 2001 From: Ramesh Mane <101566080+rameshmane7218@users.noreply.github.com> Date: Fri, 15 Mar 2024 12:56:40 +0530 Subject: [PATCH] Nc fix(nc-gui): select type fields default value update issue (#7864) * fix(nc-gui): select type fields default value update issue * chore(nc-gui): lint * fix(nc-gui): pr review changes #2535 * fix: remove null assertion --------- Co-authored-by: Raju Udava <86527202+dstala@users.noreply.github.com> --- .../dashboard/TreeView/ProjectNode.vue | 2 +- .../smartsheet/column/SelectOptions.vue | 95 +++++++++++++------ 2 files changed, 67 insertions(+), 30 deletions(-) diff --git a/packages/nc-gui/components/dashboard/TreeView/ProjectNode.vue b/packages/nc-gui/components/dashboard/TreeView/ProjectNode.vue index 44611a4b0a..b173089da6 100644 --- a/packages/nc-gui/components/dashboard/TreeView/ProjectNode.vue +++ b/packages/nc-gui/components/dashboard/TreeView/ProjectNode.vue @@ -527,7 +527,7 @@ const projectDelete = () => { v-if="base?.sources?.[0]?.enabled" key="erd" data-testid="nc-sidebar-base-relations" - @click="openErdView(base?.sources?.[0]!)" + @click="openErdView(base?.sources?.[0])" >
diff --git a/packages/nc-gui/components/smartsheet/column/SelectOptions.vue b/packages/nc-gui/components/smartsheet/column/SelectOptions.vue index 111f0751d0..99ec766c1a 100644 --- a/packages/nc-gui/components/smartsheet/column/SelectOptions.vue +++ b/packages/nc-gui/components/smartsheet/column/SelectOptions.vue @@ -11,6 +11,8 @@ interface Option { id?: string fk_colum_id?: string order?: number + status?: 'remove' + index?: number } const props = defineProps<{ @@ -30,7 +32,7 @@ const { optionsMagic: _optionsMagic } = useNocoEe() const optionsWrapperDomRef = ref() -const options = ref<(Option & { status?: 'remove'; index?: number })[]>([]) +const options = ref([]) const isAddingOption = ref(false) @@ -39,15 +41,14 @@ const OPTIONS_PAGE_COUNT = 20 const loadedOptionAnchor = ref(OPTIONS_PAGE_COUNT) const isReverseLazyLoad = ref(false) -const renderedOptions = ref<(Option & { status?: 'remove'; index?: number })[]>([]) -const savedDefaultOption = ref