Browse Source

feat: if node is dropping outside revert the order

Signed-off-by: Pranav C <pranavxc@gmail.com>
pull/5807/head
Pranav C 2 years ago
parent
commit
851530b60a
  1. 3
      packages/nc-gui/components/dashboard/TreeView.vue

3
packages/nc-gui/components/dashboard/TreeView.vue

@ -96,6 +96,8 @@ const initSortable = (el: Element) => {
onEnd: async (evt) => {
const { newIndex = 0, oldIndex = 0 } = evt
if(newIndex === oldIndex) return
const itemEl = evt.item as HTMLLIElement
const item = tablesById[itemEl.dataset.id as string]
@ -193,6 +195,7 @@ const initSortable = (el: Element) => {
}),
)
},
revertOnSpill: true,
})
}

Loading…
Cancel
Save