refactor(updateNode): replace false as default closes #4164
This commit is contained in:
@@ -11,6 +11,7 @@
|
||||
- call `onEnd` in XYResizer thanks @tonyf
|
||||
- cleanup `getPositionWithOrigin` usage
|
||||
- use `setAttributes` flag for dimension change when `width`/`height` should be set
|
||||
- use `replace: false` as the default for `updateNode` function
|
||||
|
||||
## 12.0.0-next.14
|
||||
|
||||
|
||||
@@ -291,7 +291,7 @@ export function useReactFlow<NodeType extends Node = Node, EdgeType extends Edge
|
||||
);
|
||||
|
||||
const updateNode = useCallback<Instance.UpdateNode<NodeType>>(
|
||||
(id, nodeUpdate, options = { replace: true }) => {
|
||||
(id, nodeUpdate, options = { replace: false }) => {
|
||||
setNodes((prevNodes) =>
|
||||
prevNodes.map((node) => {
|
||||
if (node.id === id) {
|
||||
|
||||
Reference in New Issue
Block a user