mirror of
https://github.com/antebudimir/feishin.git
synced 2025-12-31 18:13:31 +00:00
Add undefined check on scrollTo
This commit is contained in:
parent
915b0eb372
commit
6deab38c67
1 changed files with 1 additions and 1 deletions
|
|
@ -122,7 +122,7 @@ export const VirtualInfiniteGrid = forwardRef(
|
|||
}
|
||||
},
|
||||
scrollTo: (index: number) => {
|
||||
listRef.current.scrollToItem(index);
|
||||
listRef?.current?.scrollToItem(index);
|
||||
},
|
||||
setItemData: (data: any[]) => {
|
||||
setItemData(data);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue