mirror of
https://github.com/Sonarr/Sonarr.git
synced 2026-04-20 21:54:58 -04:00
Revert "Fixed scrolling via jump list on series index"
This reverts commit 5d316ad7dc.
This commit is contained in:
@@ -7,6 +7,8 @@ import { WindowScroller, Grid } from 'react-virtualized';
|
||||
import hasDifferentItemsOrOrder from 'Utilities/Object/hasDifferentItemsOrOrder';
|
||||
import styles from './VirtualTable.css';
|
||||
|
||||
const ROW_HEIGHT = 38;
|
||||
|
||||
function overscanIndicesGetter(options) {
|
||||
const {
|
||||
cellCount,
|
||||
@@ -45,7 +47,8 @@ class VirtualTable extends Component {
|
||||
|
||||
componentDidUpdate(prevProps, prevState) {
|
||||
const {
|
||||
items
|
||||
items,
|
||||
scrollIndex
|
||||
} = this.props;
|
||||
|
||||
const {
|
||||
@@ -56,6 +59,13 @@ class VirtualTable extends Component {
|
||||
// recomputeGridSize also forces Grid to discard its cache of rendered cells
|
||||
this._grid.recomputeGridSize();
|
||||
}
|
||||
|
||||
if (scrollIndex != null && scrollIndex !== prevProps.scrollIndex) {
|
||||
this._grid.scrollToCell({
|
||||
rowIndex: scrollIndex,
|
||||
columnIndex: 0
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
@@ -86,8 +96,6 @@ class VirtualTable extends Component {
|
||||
header,
|
||||
headerHeight,
|
||||
rowRenderer,
|
||||
rowHeight,
|
||||
scrollIndex,
|
||||
...otherProps
|
||||
} = this.props;
|
||||
|
||||
@@ -117,11 +125,6 @@ class VirtualTable extends Component {
|
||||
if (!height) {
|
||||
return null;
|
||||
}
|
||||
|
||||
const finalScrollTop = scrollIndex == null ?
|
||||
scrollTop :
|
||||
scrollIndex * rowHeight;
|
||||
|
||||
return (
|
||||
<Measure
|
||||
whitelist={['width']}
|
||||
@@ -141,11 +144,11 @@ class VirtualTable extends Component {
|
||||
width={width}
|
||||
height={height}
|
||||
headerHeight={height - headerHeight}
|
||||
rowHeight={rowHeight}
|
||||
rowHeight={ROW_HEIGHT}
|
||||
rowCount={items.length}
|
||||
columnCount={1}
|
||||
columnWidth={width}
|
||||
scrollTop={finalScrollTop}
|
||||
scrollTop={scrollTop}
|
||||
onScroll={onChildScroll}
|
||||
overscanRowCount={2}
|
||||
cellRenderer={rowRenderer}
|
||||
|
||||
Reference in New Issue
Block a user