File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -48,6 +48,8 @@ function PlaceholderItem<T>({ renderPlaceholder }: Props<T>) {
4848 onChange (
4949 activeCellSize ,
5050 call ( [ activeCellSize ] , ( [ size ] ) => {
51+ // Using animated values to set height caused a bug where item wouldn't correctly update
52+ // so instead we mirror the animated value in component state.
5153 setPlaceholderSize ( size ) ;
5254 } )
5355 ) ,
@@ -74,7 +76,7 @@ function PlaceholderItem<T>({ renderPlaceholder }: Props<T>) {
7476
7577 const animStyle = {
7678 opacity,
77- [ sizeKey ] : placeholderSize , // Using animated values to set height caused a bug where item wouldn't correctly update
79+ [ sizeKey ] : placeholderSize ,
7880 transform : ( [
7981 { [ translateKey ] : sub ( placeholderOffset , scrollOffset ) } ,
8082 ] as unknown ) as Animated . AnimatedTransform ,
You can’t perform that action at this time.
0 commit comments