The solution: Clean the code section before appending new clicked query. We first check if there are some child nodes and if there are, we remove them and append the new code. It's strange that there are methods for getting firstChild, all children or parent element, but there is no method for cleaning html code inside the node.
Root cause: The main issue was that we are replace only the first child, which is one of many inside the node.
The solution: Clean the code section before appending new clicked query. We first check if there are some child nodes and if there are, we remove them and append the new code. It's strange that there are methods for getting firstChild, all children or parent element, but there is no method for cleaning html code inside the node.
Root cause: The main issue was that we are replace only the first child, which is one of many inside the node.
Issue: https://github.com/FormidableLabs/urql-devtools/issues/351
Video after the fix:
https://user-images.githubusercontent.com/12056467/115618244-1b184b00-a2fb-11eb-89ec-5642f24bd387.mov