File tree Expand file tree Collapse file tree
apps/webapp/app/components/primitives/TreeView Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ import { UnmountClosed } from "react-collapse";
44import { cn } from "~/utils/cn" ;
55import { NodeState , NodesState , reducer } from "./reducer" ;
66import { applyFilterToState , concreteStateFromInput , selectedIdFromState } from "./utils" ;
7+ import { motion } from "framer-motion" ;
78
89export 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
You can’t perform that action at this time.
0 commit comments