mirror of
https://github.com/Sonarr/Sonarr
synced 2025-12-06 00:17:47 +01:00
Queue hiding when switching pages
This commit is contained in:
parent
064cbdbfb1
commit
8c9be06ead
2 changed files with 5 additions and 3 deletions
|
|
@ -63,7 +63,6 @@ function Queue() {
|
|||
totalRecords,
|
||||
error,
|
||||
isFetching,
|
||||
isFetched,
|
||||
isLoading,
|
||||
page,
|
||||
goToPage,
|
||||
|
|
@ -108,8 +107,10 @@ function Queue() {
|
|||
|
||||
const isRefreshing =
|
||||
isLoading || isEpisodesFetching || isRefreshMonitoredDownloadsExecuting;
|
||||
|
||||
// Use isLoading over isFetched to avoid losing the table UI when switching pages
|
||||
const isAllPopulated =
|
||||
isFetched &&
|
||||
!isLoading &&
|
||||
(isEpisodesPopulated ||
|
||||
!records.length ||
|
||||
records.every((e) => !e.episodeIds?.length));
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { useQuery } from '@tanstack/react-query';
|
||||
import { keepPreviousData, useQuery } from '@tanstack/react-query';
|
||||
import { useMemo } from 'react';
|
||||
import { PropertyFilter } from 'App/State/AppState';
|
||||
import { SortDirection } from 'Helpers/Props/sortDirections';
|
||||
|
|
@ -89,6 +89,7 @@ const usePagedApiQuery = <T>(options: PagedQueryOptions<T>) => {
|
|||
),
|
||||
};
|
||||
},
|
||||
placeholderData: keepPreviousData,
|
||||
});
|
||||
|
||||
return {
|
||||
|
|
|
|||
Loading…
Reference in a new issue