mirror of
https://github.com/TriliumNext/Trilium.git
synced 2025-12-10 03:53:37 -06:00
chore(collections/board): fix unnecessary repaint
This commit is contained in:
parent
c8f9d6e6df
commit
0844f60343
@ -147,8 +147,10 @@ function useDragging({ column, columnIndex, columnItems }: DragContext) {
|
||||
}
|
||||
}
|
||||
|
||||
setDropPosition({ column, index: newIndex });
|
||||
}, [column, setDropTarget, setDropPosition]);
|
||||
if (!(dropPosition?.column === column && dropPosition.index === newIndex)) {
|
||||
setDropPosition({ column, index: newIndex });
|
||||
}
|
||||
}, [column, setDropTarget, dropPosition, setDropPosition]);
|
||||
|
||||
const handleDragLeave = useCallback((e: DragEvent) => {
|
||||
const relatedTarget = e.relatedTarget as HTMLElement;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user