Compare commits
1 Commits
9aa28a9fa3
...
110f5dc92e
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
110f5dc92e |
@@ -264,7 +264,12 @@ const Graph = forwardRef<GraphHandle, { setGraphPath: React.Dispatch<React.SetSt
|
|||||||
title: selectedNodeName,
|
title: selectedNodeName,
|
||||||
key: pathSegmentId,
|
key: pathSegmentId,
|
||||||
onClick: () => {
|
onClick: () => {
|
||||||
setGraphsPath(prev => prev.slice(0, prev.findIndex(p => p.key === pathSegmentId) + 1));
|
const index = graphsPath.findIndex(p => p.key === pathSegmentId);
|
||||||
|
setGraphsPath(prev => {
|
||||||
|
prev.splice(index + 1);
|
||||||
|
|
||||||
|
return [...prev];
|
||||||
|
});
|
||||||
selectGraphId(pathSegmentId);
|
selectGraphId(pathSegmentId);
|
||||||
}
|
}
|
||||||
} as BreadcrumbItemType;
|
} as BreadcrumbItemType;
|
||||||
|
|||||||
Reference in New Issue
Block a user