mirror of
https://github.com/jeffvli/feishin.git
synced 2026-05-07 04:20:12 +02:00
Add undefined check on scrollTo
This commit is contained in:
@@ -122,7 +122,7 @@ export const VirtualInfiniteGrid = forwardRef(
|
||||
}
|
||||
},
|
||||
scrollTo: (index: number) => {
|
||||
listRef.current.scrollToItem(index);
|
||||
listRef?.current?.scrollToItem(index);
|
||||
},
|
||||
setItemData: (data: any[]) => {
|
||||
setItemData(data);
|
||||
|
||||
Reference in New Issue
Block a user