ScrollableList: fix empty children

This commit is contained in:
Alex Gleason 2022-04-22 00:49:11 -05:00
parent b3f4abc8c1
commit 0d463bbbd1
No known key found for this signature in database
GPG Key ID: 7211D1F99744FBB7
1 changed files with 1 additions and 1 deletions

View File

@ -61,7 +61,7 @@ const ScrollableList: React.FC<IScrollableList> = ({
<Virtuoso <Virtuoso
useWindowScroll useWindowScroll
className={className} className={className}
data={showPlaceholder ? Array(placeholderCount).fill('') : Array.from(children)} data={showPlaceholder ? Array(placeholderCount).fill('') : Array.from(children || [])}
startReached={onScrollToTop} startReached={onScrollToTop}
endReached={onLoadMore} endReached={onLoadMore}
isScrolling={isScrolling => isScrolling && onScroll && onScroll()} isScrolling={isScrolling => isScrolling && onScroll && onScroll()}