From 214c5feeb406e4d03a275f8385e17129a4ac2343 Mon Sep 17 00:00:00 2001 From: Pranav C Date: Fri, 30 Jun 2023 22:31:27 +0530 Subject: [PATCH] fix: on link in row, immediately remove item from list to avoid adding same item twice Signed-off-by: Pranav C --- .../nc-gui/components/virtual-cell/components/ListItems.vue | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/nc-gui/components/virtual-cell/components/ListItems.vue b/packages/nc-gui/components/virtual-cell/components/ListItems.vue index 290d43de87..64a633af20 100644 --- a/packages/nc-gui/components/virtual-cell/components/ListItems.vue +++ b/packages/nc-gui/components/virtual-cell/components/ListItems.vue @@ -50,6 +50,7 @@ const selectedRowIndex = ref(0) const isAltKeyDown = ref(false) const linkRow = async (row: Record) => { + childrenExcludedList.value?.list?.splice(selectedRowIndex.value, 1) if (isNew.value) { addLTARRef(row, column?.value as ColumnType) saveRow!() @@ -57,7 +58,7 @@ const linkRow = async (row: Record) => { await link(row) } if (isAltKeyDown.value) { - loadChildrenExcludedList() + if (!isNew.value) loadChildrenExcludedList() } else { vModel.value = false }