Skip to content
Snippets Groups Projects
Commit 36b11ad3 authored by Sjoerd's avatar Sjoerd Committed by Leonardo Christino
Browse files

fix: remove logic pill on node removal in qb

parent 8321e14d
No related branches found
No related tags found
1 merge request!296fix: remove logic pill on node removal in qb
Pipeline #140974 passed
......@@ -76,6 +76,14 @@ export const ContextMenu = (props: {
}
function removeNode() {
if (!props.node) return;
const connectedLogicPills = graphologyGraph.neighbors(props.node.id);
connectedLogicPills.forEach((pill) => {
const attributes = graphologyGraph.getNodeAttributes(pill);
if (attributes.type === 'logic') {
graphologyGraph.dropNode(pill);
}
});
graphologyGraph.dropNode(props.node.id);
dispatch(setQuerybuilderGraphology(graphologyGraph));
props.onClose();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment