mirror of
https://github.com/Readarr/Readarr.git
synced 2026-04-24 22:35:39 -04:00
Fixed: restoring scroll position when going back to index page
This commit is contained in:
@@ -112,7 +112,8 @@ class AuthorIndexBanners extends Component {
|
||||
items,
|
||||
sortKey,
|
||||
bannerOptions,
|
||||
jumpToCharacter
|
||||
jumpToCharacter,
|
||||
scrollTop
|
||||
} = this.props;
|
||||
|
||||
const {
|
||||
@@ -149,6 +150,10 @@ class AuthorIndexBanners extends Component {
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
if (this._grid && scrollTop !== 0) {
|
||||
this._grid.scrollToPosition({ scrollTop });
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
@@ -306,6 +311,7 @@ AuthorIndexBanners.propTypes = {
|
||||
sortKey: PropTypes.string,
|
||||
bannerOptions: PropTypes.object.isRequired,
|
||||
jumpToCharacter: PropTypes.string,
|
||||
scrollTop: PropTypes.number.isRequired,
|
||||
scroller: PropTypes.instanceOf(Element).isRequired,
|
||||
showRelativeDates: PropTypes.bool.isRequired,
|
||||
shortDateFormat: PropTypes.string.isRequired,
|
||||
|
||||
Reference in New Issue
Block a user