mirror of
https://github.com/Radarr/Radarr
synced 2025-01-03 05:44:50 +00:00
Fixed: Restoring scroll position when going back/forward to series list
(cherry picked from commit 5aad84dba453c42b4b5a9eac43deecf91a98f4f6)
This commit is contained in:
parent
e0b91c6406
commit
df26229e4d
1 changed files with 8 additions and 2 deletions
|
@ -10,6 +10,7 @@ import PageToolbarButton from 'Components/Page/Toolbar/PageToolbarButton';
|
|||
import PageToolbarSection from 'Components/Page/Toolbar/PageToolbarSection';
|
||||
import PageToolbarSeparator from 'Components/Page/Toolbar/PageToolbarSeparator';
|
||||
import TableOptionsModalWrapper from 'Components/Table/TableOptions/TableOptionsModalWrapper';
|
||||
import withScrollPosition from 'Components/withScrollPosition';
|
||||
import { align, icons } from 'Helpers/Props';
|
||||
import SortDirection from 'Helpers/Props/SortDirection';
|
||||
import NoMovie from 'Movie/NoMovie';
|
||||
|
@ -48,7 +49,11 @@ function getViewComponent(view: string) {
|
|||
return MovieIndexTable;
|
||||
}
|
||||
|
||||
function MovieIndex() {
|
||||
interface MovieIndexProps {
|
||||
initialScrollTop?: number;
|
||||
}
|
||||
|
||||
const MovieIndex = withScrollPosition((props) => {
|
||||
const {
|
||||
isFetching,
|
||||
isPopulated,
|
||||
|
@ -257,6 +262,7 @@ function MovieIndex() {
|
|||
ref={scrollerRef}
|
||||
className={styles.contentBody}
|
||||
innerClassName={styles[`${view}InnerContentBody`]}
|
||||
initialScrollTop={props.initialScrollTop}
|
||||
onScroll={onScroll}
|
||||
>
|
||||
{isFetching && !isPopulated ? <LoadingIndicator /> : null}
|
||||
|
@ -301,6 +307,6 @@ function MovieIndex() {
|
|||
) : null}
|
||||
</PageContent>
|
||||
);
|
||||
}
|
||||
}, 'movieIndex');
|
||||
|
||||
export default MovieIndex;
|
||||
|
|
Loading…
Reference in a new issue