Actually make initialTopMostItemIndex make some sense

Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
This commit is contained in:
marcin mikołajczak 2024-08-31 18:02:05 +02:00
parent 9207930f2c
commit da5fc0449c

View file

@ -216,8 +216,9 @@ const ScrollableList = React.forwardRef<VirtuosoHandle, IScrollableList>(({
if (initialTopMostItemIndex) {
if (typeof initialTopMostItemIndex === 'number') {
return {
align: 'center',
align: 'start',
index: initialTopMostItemIndex,
offset: 60,
};
}
return initialTopMostItemIndex;