Browse Source

fix: on link in row, immediately remove item from list to avoid adding same item twice

Signed-off-by: Pranav C <pranavxc@gmail.com>
pull/5848/head
Pranav C 2 years ago
parent
commit
214c5feeb4
  1. 3
      packages/nc-gui/components/virtual-cell/components/ListItems.vue

3
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<string, any>) => {
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<string, any>) => {
await link(row)
}
if (isAltKeyDown.value) {
loadChildrenExcludedList()
if (!isNew.value) loadChildrenExcludedList()
} else {
vModel.value = false
}

Loading…
Cancel
Save