diff --git a/app/components/PaginatedList.tsx b/app/components/PaginatedList.tsx index bb0bca613..3f4911df2 100644 --- a/app/components/PaginatedList.tsx +++ b/app/components/PaginatedList.tsx @@ -54,6 +54,9 @@ class PaginatedList extends React.Component> { @observable isFetching = false; + @observable + isFetchingInitial = !this.props.items?.length; + @observable fetchCounter = 0; @@ -85,6 +88,7 @@ class PaginatedList extends React.Component> { this.allowLoadMore = true; this.renderCount = DEFAULT_PAGINATION_LIMIT; this.isFetching = false; + this.isFetchingInitial = false; this.isFetchingMore = false; }; @@ -112,6 +116,7 @@ class PaginatedList extends React.Component> { } this.renderCount += limit; + this.isFetchingInitial = false; } catch (err) { this.error = err; } finally { @@ -159,7 +164,7 @@ class PaginatedList extends React.Component> { const showLoading = this.isFetching && !this.isFetchingMore && - (!items?.length || this.fetchCounter === 0); + (!items?.length || (this.fetchCounter <= 1 && this.isFetchingInitial)); if (showLoading) { return (