fix(react): handle drag for nodes that are initially hidden
This commit is contained in:
@@ -31,7 +31,6 @@ export function useDrag({
|
||||
const xyDrag = useRef<XYDragInstance>();
|
||||
|
||||
useEffect(() => {
|
||||
if (nodeRef?.current) {
|
||||
xyDrag.current = XYDrag({
|
||||
getStoreItems: () => store.getState(),
|
||||
onNodeMouseDown: (id: string) => {
|
||||
@@ -48,7 +47,6 @@ export function useDrag({
|
||||
setDragging(false);
|
||||
},
|
||||
});
|
||||
}
|
||||
}, []);
|
||||
|
||||
useEffect(() => {
|
||||
|
||||
Reference in New Issue
Block a user