Skip to content

Commit 8d09a84

Browse files
authored
Update history on stage change (#620)
1 parent 2828851 commit 8d09a84

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

src/main/frontend/pipeline-console-view/pipeline-console/main/DataTreeView.tsx

+11-2
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,17 @@ function TreeNode({ stage, selected, onSelect }: TreeNodeProps) {
5353
return (
5454
<div className="task">
5555
<div className="pgv-tree-node-header">
56-
<button
56+
<a
57+
href={`?selected-node=` + stage.id}
5758
onClick={(e) => {
59+
// Only prevent left clicks
60+
if (e.button !== 0 || e.metaKey || e.ctrlKey) {
61+
return;
62+
}
63+
64+
e.preventDefault();
65+
66+
history.replaceState({}, "", `?selected-node=` + stage.id);
5867
if (!isSelected) {
5968
onSelect(e, String(stage.id));
6069
}
@@ -78,7 +87,7 @@ function TreeNode({ stage, selected, onSelect }: TreeNodeProps) {
7887
</span>
7988
)}
8089
</div>
81-
</button>
90+
</a>
8291

8392
{hasChildren && (
8493
<button

0 commit comments

Comments
 (0)