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