So I'm currently running into an issue where when I delete nodes from the graph, the data from the backend shows them as being deleted but they still appear on the graph after a brief flash away. When I click a tab in my program to load another graph(model), and then tab back to the graph with the deleted nodes then they are gone.
#How to force refresh the graph after changes?
1 messages · Page 1 of 1 (latest)
You sure you're not having some logical issue in your code?
Trying to "force" a refresh sounds like a hacky solution and the actual problem is more with how you update your elements 🤔
It does seem hacky but unfortunately I can't figure out any other way since the data is updating correctly, and the data that is fed to the graph is in a useEffect that returns console.logs when the changes happen whether that be adding, deleted, etc. So I don't understand why it takes me clicking on another graph, and then back to my current graph to see the change appear in the UI.
Not to mention, there is a brief flash where the node dissappears and then immediately reappears
And you're sure you don't have a different useEffect that possibly interferes here?
How are you setting your state in the useEffect that handles your update?
It is hard to help without code. Braks is trying his best, but I am pretty sure this is a React problem than a React Flow problem.