Commit Graph
2 Commits
Author SHA1 Message Date
ysds 382c654c31 chore(changeset): add changeset for drag handler fix 2026-01-24 03:01:29 +09:00
ysds 03b8e1ef19 fix: ensure drag handlers update when nodes selection changes programmatically
Fixes #4841

When nodes were programmatically selected (e.g., adding a new node with `selected: true`),
the nodes selection rectangle would appear but dragging it would not work.

Changes:
- Consolidated duplicate effect hooks in useDrag into a single useIsomorphicLayoutEffect
- Added `disabled` parameter to useDrag to allow external control
- NodesSelection now passes `disabled: !shouldRender` to useDrag
- Improved condition clarity with `shouldRender` variable

This ensures drag handlers are properly set up when nodeRef.current becomes available,
even when the selection state changes after the initial render.
2026-01-24 02:29:02 +09:00