xyflow / xyflow

React Flow | Svelte Flow - Powerful open source libraries for building node-based UIs with React (https://reactflow.dev) or Svelte (https://svelteflow.dev). Ready out-of-the-box and infinitely customizable.
https://xyflow.com
MIT License
21.54k stars 1.43k forks source link

fix(react): default node updates closes #4202 #4219

Closed moklick closed 2 weeks ago

moklick commented 2 weeks ago

This PR makes sure that we are always working with triggerNodeChanges which works with default nodes and controlled nodes. In the previous version we used onNodesChange directly which led to outdated default nodes and related hooks.