diff --git a/react/src/lib/components/GroupTree/components/GroupTreeViewer.tsx b/react/src/lib/components/GroupTree/components/GroupTreeViewer.tsx index 8a5fa93b9..4d36df737 100644 --- a/react/src/lib/components/GroupTree/components/GroupTreeViewer.tsx +++ b/react/src/lib/components/GroupTree/components/GroupTreeViewer.tsx @@ -34,6 +34,12 @@ const GroupTreeViewer: React.FC = () => { (state: GroupTreeState) => state.ui.currentFlowRate ); useEffect(() => { + // Clear possible elements added from earlier updates. + const node = document.getElementById("grouptree_tree"); + if (node) { + node.innerHTML = ""; + } + renderer.current = new GroupTree( "#grouptree_tree", cloneDeep(data),