mirror of
https://github.com/Readarr/Readarr.git
synced 2026-04-18 21:34:28 -04:00
Fixed: restoring scroll position when going back to index page
This commit is contained in:
@@ -47,6 +47,7 @@ class VirtualTable extends Component {
|
||||
const {
|
||||
items,
|
||||
scrollIndex,
|
||||
scrollTop,
|
||||
onRecompute
|
||||
} = this.props;
|
||||
|
||||
@@ -68,6 +69,10 @@ class VirtualTable extends Component {
|
||||
columnIndex: 0
|
||||
});
|
||||
}
|
||||
|
||||
if (this._grid && scrollTop !== undefined && scrollTop !== 0) {
|
||||
this._grid.scrollToPosition({ scrollTop });
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
@@ -95,6 +100,7 @@ class VirtualTable extends Component {
|
||||
className,
|
||||
items,
|
||||
scroller,
|
||||
scrollTop: ignored,
|
||||
header,
|
||||
headerHeight,
|
||||
rowHeight,
|
||||
@@ -179,6 +185,7 @@ VirtualTable.propTypes = {
|
||||
className: PropTypes.string.isRequired,
|
||||
items: PropTypes.arrayOf(PropTypes.object).isRequired,
|
||||
scrollIndex: PropTypes.number,
|
||||
scrollTop: PropTypes.number,
|
||||
scroller: PropTypes.instanceOf(Element).isRequired,
|
||||
header: PropTypes.node.isRequired,
|
||||
headerHeight: PropTypes.number.isRequired,
|
||||
|
||||
Reference in New Issue
Block a user