mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-08-24 00:48:36 +00:00
fixed issue: 5780 unable to delete lineage edge (#5797)
* fixed issue: 5780 unable to delete lineage edge * removed warrning while moving node
This commit is contained in:
parent
006b1fe1a4
commit
cdb135aab8
@ -189,6 +189,8 @@ const Entitylineage: FunctionComponent<EntityLineageProp> = ({
|
|||||||
[]
|
[]
|
||||||
);
|
);
|
||||||
|
|
||||||
|
const customEdges = useMemo(() => ({ buttonedge: CustomEdge }), []);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* take node as input and check if node is main entity or not
|
* take node as input and check if node is main entity or not
|
||||||
* @param node
|
* @param node
|
||||||
@ -394,6 +396,8 @@ const Entitylineage: FunctionComponent<EntityLineageProp> = ({
|
|||||||
};
|
};
|
||||||
if (newCol.fromColumns?.length) {
|
if (newCol.fromColumns?.length) {
|
||||||
return [...col, newCol];
|
return [...col, newCol];
|
||||||
|
} else {
|
||||||
|
return col;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -421,13 +425,15 @@ const Entitylineage: FunctionComponent<EntityLineageProp> = ({
|
|||||||
}),
|
}),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
setEdges((pre) =>
|
setEdges((pre) => {
|
||||||
pre.filter(
|
return pre.filter(
|
||||||
(e) =>
|
(e) =>
|
||||||
e.sourceHandle !== data.data?.sourceHandle &&
|
!(
|
||||||
e.targetHandle !== data.data?.targetHandle
|
e.sourceHandle === data.data?.sourceHandle &&
|
||||||
)
|
e.targetHandle === data.data?.targetHandle
|
||||||
);
|
)
|
||||||
|
);
|
||||||
|
});
|
||||||
addLineageHandler(selectedEdge);
|
addLineageHandler(selectedEdge);
|
||||||
setNewAddedNode({} as Node);
|
setNewAddedNode({} as Node);
|
||||||
setSelectedEntity({} as EntityReference);
|
setSelectedEntity({} as EntityReference);
|
||||||
@ -1314,7 +1320,7 @@ const Entitylineage: FunctionComponent<EntityLineageProp> = ({
|
|||||||
<ReactFlowProvider>
|
<ReactFlowProvider>
|
||||||
<ReactFlow
|
<ReactFlow
|
||||||
data-testid="react-flow-component"
|
data-testid="react-flow-component"
|
||||||
edgeTypes={{ buttonedge: CustomEdge }}
|
edgeTypes={customEdges}
|
||||||
edges={edges}
|
edges={edges}
|
||||||
maxZoom={2}
|
maxZoom={2}
|
||||||
minZoom={0.5}
|
minZoom={0.5}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user