Using Dagre For layouting - How to apply layout on first render #4167
Unanswered
royhuntley
asked this question in
Layouting
Replies: 2 comments 1 reply
-
@royhuntley any progress on this, Here's my issue: |
Beta Was this translation helpful? Give feedback.
1 reply
-
I have manage to solve my issue, of wanting to apply the layout upon first render. const onLoad = useCallback( () => { onLayout('LR'); setTimeout(() => fitView(), 0) } ); and then... <ReactFlow onLoad={onLoad} etc,,,,> |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Am just starting to use Dagre as a layouting library. Using the example here : https://reactflow.dev/learn/layouting/layouting
I can see the layouting works when clicking either horizontal or vertical. How do i get the layout to apply on the first render of the nodes (ie, without having to click the button) first. Thanks
Beta Was this translation helpful? Give feedback.
All reactions