Skip to content

Commit

Permalink
🚸 update fitView options to include new nodes in auto layout
Browse files Browse the repository at this point in the history
  • Loading branch information
junkisai committed Dec 26, 2024
1 parent c342bd8 commit 369deb6
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
6 changes: 6 additions & 0 deletions .changeset/clever-fishes-travel.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@liam-hq/erd-core": patch
"@liam-hq/cli": patch
---

🚸 update fitView options to include new nodes in auto layout
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,10 @@ export const useAutoLayout = () => {

setNodes([...hiddenNodes, ...newNodes])
setTimeout(() => {
fitView(fitViewOptions)
fitView({
...fitViewOptions,
nodes: newNodes,
})
setLoading(false)
setInitializeComplete(true)
}, 0)
Expand Down

0 comments on commit 369deb6

Please sign in to comment.