ScrollableList: render a spinner if placeholder isn't provided

This commit is contained in:
Alex Gleason 2022-04-22 12:27:37 -05:00
parent ae48cb2c06
commit 730556a692
No known key found for this signature in database
GPG Key ID: 7211D1F99744FBB7
1 changed files with 2 additions and 0 deletions

View File

@ -105,6 +105,8 @@ const ScrollableList: React.FC<IScrollableList> = ({
// Don't use Virtuoso's Footer component so it preserves spacing // Don't use Virtuoso's Footer component so it preserves spacing
if (hasMore && Placeholder) { if (hasMore && Placeholder) {
data.push(<Placeholder />); data.push(<Placeholder />);
} else if (hasMore) {
data.push(<Spinner />);
} }
return ( return (