refactor: reimplement logic of remove multiple keys
This commit is contained in:
tiny-craft
2023-07-06 14:50:36 +08:00
parent 1841ccf3d3
commit 9cd0d34c5d
4 changed files with 49 additions and 19 deletions

View File

@@ -284,7 +284,7 @@ const findSiblingsAndIndex = (node, nodes) => {
}
// delay save until stop drop after 2 seconds
const saveSort = debounce(connectionStore.saveConnectionSort, 2000, { trailing: true })
const saveSort = debounce(connectionStore.saveConnectionSorted, 2000, { trailing: true })
const handleDrop = ({ node, dragNode, dropPosition }) => {
const [dragNodeSiblings, dragNodeIndex] = findSiblingsAndIndex(dragNode, connectionStore.connections)
if (dragNodeSiblings === null || dragNodeIndex === null) {