Skip to content

Commit 3a550b5

Browse files
committed
Don’t expand the individual node if you’re holding alt
1 parent aea39d4 commit 3a550b5

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

apps/webapp/app/components/primitives/TreeView/TreeView.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -434,6 +434,8 @@ export function useTree<TData>({
434434
}
435435
case "Right":
436436
case "ArrowRight": {
437+
e.preventDefault();
438+
437439
const selected = selectedIdFromState(state.nodes);
438440

439441
if (selected) {
@@ -443,11 +445,11 @@ export function useTree<TData>({
443445
if (treeNode && treeNode.hasChildren) {
444446
expandLevel(treeNode.level);
445447
}
448+
break;
446449
}
447450

448451
expandNode(selected, true);
449452
}
450-
e.preventDefault();
451453
break;
452454
}
453455
case "Escape": {

0 commit comments

Comments
 (0)