Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions packages/core/components/FileDetails/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -190,8 +190,7 @@ export default function FileDetails(props: Props) {
</Modal>
<div className={styles.titleRow}>
<h4>Metadata</h4>
{/* To do: un-hide the provenance source button while in graph mode, should redraw graph */}
{hasProvenanceSource && !props.onClose && (
{hasProvenanceSource && (
<DefaultButton
onClick={() =>
dispatch(
Expand All @@ -201,7 +200,7 @@ export default function FileDetails(props: Props) {
)
}
>
View provenance
View relationship diagram
</DefaultButton>
)}
</div>
Expand Down
10 changes: 2 additions & 8 deletions packages/core/components/NetworkGraph/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,14 +59,8 @@ function NetworkGraph(props: NetworkGraphProps) {
// Unfortunately we have to have some notion of state at a high level for control from the components
// and at the dagre level for when the user does a drag action causing this duplication of efforts
React.useEffect(() => {
let cancel = false;
if (!cancel) {
setEdges(graph.edges);
setNodes(graph.nodes);
}
return function cleanup() {
cancel = true;
};
setEdges(graph.edges);
setNodes(graph.nodes);
}, [graph, setEdges, setNodes, refreshKey]);

// The option to open this graph shouldn't even appear when a
Expand Down
2 changes: 2 additions & 0 deletions packages/core/state/interaction/logics.ts
Original file line number Diff line number Diff line change
Expand Up @@ -762,6 +762,8 @@ const setOriginForProvenance = createLogic({
graph.reset();
dispatch(refreshGraph());
} else {
// Clear old nodes
graph.reset();
dispatch(expandGraph(file));
}
done();
Expand Down
Loading