Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(nodes): re-measure nodes when dimensions are missing #3897

Merged
merged 10 commits into from
Feb 15, 2024

Conversation

moklick
Copy link
Member

@moklick moklick commented Feb 12, 2024

No description provided.

@moklick moklick changed the title fix(nodes): re-measure nodes when dimensions are missing closes #3886 fix(nodes): re-measure nodes when dimensions are missing Feb 13, 2024
@mcupito
Copy link

mcupito commented Feb 15, 2024

Hi @moklick - any update on this?

@moklick
Copy link
Member Author

moklick commented Feb 15, 2024

Hey @mcupito

this is still WIP.

@moklick moklick changed the base branch from v11 to next-v11 February 15, 2024 15:33
@moklick moklick merged commit f13a474 into next-v11 Feb 15, 2024
@moklick moklick deleted the fix/subflow-reinit branch February 15, 2024 15:54
@moklick
Copy link
Member Author

moklick commented Feb 19, 2024

@abi-spyro, @mcupito is this issue solved for you?

@Sam-Apostel
Copy link

Hi @moklick

I updated my project from v11.10.3 to v11.10.4 and I got an infinite loop of NodeDimensionChange triggers. This causes my nodes to toggle between visibility: visible and visibility: hidden. Which causes the nodes not to be selectable/draggable.

Any ideas on where this could've gone wrong?

I am using external state management (state is stored using react-hook-form).

@moklick
Copy link
Member Author

moklick commented Mar 12, 2024

Hey @Sam-Apostel

are you applying the dimensions changes? You should use applyNodeChanges in your onNodesChange for that.

@Sam-Apostel
Copy link

@moklick using applyNodeChanges instead of my custom resolver fixed my issues. Thanks for pointing me towards that function.

Would it be helpful if we added a link to the applyChanges functions on https://reactflow.dev/api-reference/hooks/use-nodes-state ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants