77} from './hooks/useVirtualizedListAnimation' ;
88import { NodeOrientation } from '../../types/orientation' ;
99import { typedMemo } from '../../helpers/TypedMemo' ;
10- import { getLastLeftItemIndex , getLastRightItemIndex } from './helpers/getLastItemIndex' ;
1110import { getSizeInPxFromOneItemToAnother } from './helpers/getSizeInPxFromOneItemToAnother' ;
1211import { computeAllScrollOffsets } from './helpers/createScrollOffsetArray' ;
1312
@@ -158,9 +157,6 @@ export const VirtualizedList = typedMemo(
158157
159158 const dataSliceToRender = data . slice ( range . start , range . end + 1 ) ;
160159
161- const maxPossibleLeftAlignedIndex = getLastLeftItemIndex < T > ( data , itemSize , listSizeInPx ) ;
162- const maxPossibleRightAlignedIndex = getLastRightItemIndex < T > ( data , itemSize , listSizeInPx ) ;
163-
164160 const allScrollOffsets = useMemo (
165161 ( ) =>
166162 computeAllScrollOffsets ( {
@@ -170,19 +166,8 @@ export const VirtualizedList = typedMemo(
170166 scrollBehavior : scrollBehavior ,
171167 data : data ,
172168 listSizeInPx : listSizeInPx ,
173- maxPossibleLeftAlignedIndex : maxPossibleLeftAlignedIndex ,
174- maxPossibleRightAlignedIndex : maxPossibleRightAlignedIndex ,
175169 } ) ,
176- [
177- data ,
178- itemSize ,
179- listSizeInPx ,
180- maxPossibleLeftAlignedIndex ,
181- maxPossibleRightAlignedIndex ,
182- nbMaxOfItems ,
183- numberOfItemsVisibleOnScreen ,
184- scrollBehavior ,
185- ] ,
170+ [ data , itemSize , listSizeInPx , nbMaxOfItems , numberOfItemsVisibleOnScreen , scrollBehavior ] ,
186171 ) ;
187172
188173 useOnEndReached ( {
0 commit comments