fix(uncontrolled-flow): keep internals
This commit is contained in:
@@ -118,7 +118,7 @@ function useDrag({
|
||||
}
|
||||
|
||||
event.on('end', (event) => {
|
||||
setDragging(false)
|
||||
setDragging(false);
|
||||
if (dragItems.current) {
|
||||
updateNodePositions(dragItems.current, false, false);
|
||||
|
||||
|
||||
@@ -143,6 +143,7 @@ export function handleControlledNodeSelectionChange(nodeChanges: NodeSelectionCh
|
||||
if (node) {
|
||||
nodeInternals.set(node.id, {
|
||||
...node,
|
||||
[internalsSymbol]: node[internalsSymbol],
|
||||
selected: change.selected,
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1,12 +1,11 @@
|
||||
import { XYPosition, Dimensions } from './utils';
|
||||
import { NodeHandleBounds, Node } from './nodes';
|
||||
import { Node } from './nodes';
|
||||
import { Edge } from './edges';
|
||||
|
||||
export type NodeDimensionChange = {
|
||||
id: string;
|
||||
type: 'dimensions';
|
||||
dimensions: Dimensions;
|
||||
handleBounds?: NodeHandleBounds;
|
||||
};
|
||||
|
||||
export type NodePositionChange = {
|
||||
|
||||
Reference in New Issue
Block a user