Skip to content

Commit b342e06

Browse files
committed
Fix for scrolling with long run traces
1 parent 4418de5 commit b342e06

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import { UnmountClosed } from "react-collapse";
44
import { cn } from "~/utils/cn";
55
import { NodeState, NodesState, reducer } from "./reducer";
66
import { applyFilterToState, concreteStateFromInput, selectedIdFromState } from "./utils";
7+
import { motion } from "framer-motion";
78

89
export type TreeViewProps<TData> = {
910
tree: FlatTree<TData>;
@@ -64,7 +65,7 @@ export function TreeView<TData>({
6465
}, [scrollRef?.current]);
6566

6667
return (
67-
<div
68+
<motion.div
6869
ref={(element) => {
6970
parentRef.current = element;
7071
if (scrollRef) {
@@ -75,6 +76,7 @@ export function TreeView<TData>({
7576
"w-full overflow-y-auto scrollbar-thin scrollbar-track-transparent scrollbar-thumb-charcoal-600 focus-within:outline-none",
7677
parentClassName
7778
)}
79+
layoutScroll
7880
{...getTreeProps()}
7981
>
8082
<div
@@ -122,7 +124,7 @@ export function TreeView<TData>({
122124
})}
123125
</div>
124126
</div>
125-
</div>
127+
</motion.div>
126128
);
127129
}
128130

0 commit comments

Comments
 (0)