Closed LA1709 closed 2 years ago
Hi @LA1709
How are you deleting the node?
removeNodeId(id);
The id is "node-id" example: "node-5"
removeNodeId(`node-${id}`);
Are you doing it the right way?
No! Thank you so much! I was just passing the id (for example: 5) to the function.
I am working in react with drawflow, I have created a ref to the drawflow editor. On running the method
removeNodeId
on theeditor.current
, it gives me the following error -TypeError: Cannot read properties of undefined (reading 'data')
. Note: I can run all other methods likegetNodeId
and they work as intended.Here it can be seen, I log the node in the console before attempting to remove it and then it throws and error when the
removeNodeId
method is called on it.