1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2024-12-16 11:37:58 +02:00

Fixed: Letter jump bar on series list not working correctly with banners

This commit is contained in:
Mark McDowall 2019-11-26 17:41:01 -08:00
parent e6fbd10031
commit a4a33fe167

View File

@ -52,10 +52,10 @@ class VirtualTable extends Component {
} }
componentDidUpdate(prevProps, preState) { componentDidUpdate(prevProps, preState) {
const scrollIndex = this.props.scrollIndex; const { scrollIndex, rowHeight } = this.props;
if (scrollIndex != null && scrollIndex !== prevProps.scrollIndex) { if (scrollIndex != null && scrollIndex !== prevProps.scrollIndex) {
const scrollTop = (scrollIndex + 1) * ROW_HEIGHT + 20; const scrollTop = (scrollIndex + 1) * rowHeight + 20;
this.props.onScroll({ scrollTop }); this.props.onScroll({ scrollTop });
} }
@ -165,6 +165,7 @@ VirtualTable.propTypes = {
header: PropTypes.node.isRequired, header: PropTypes.node.isRequired,
headerHeight: PropTypes.number.isRequired, headerHeight: PropTypes.number.isRequired,
rowRenderer: PropTypes.func.isRequired, rowRenderer: PropTypes.func.isRequired,
rowHeight: PropTypes.number.isRequired,
onRender: PropTypes.func.isRequired, onRender: PropTypes.func.isRequired,
onScroll: PropTypes.func.isRequired onScroll: PropTypes.func.isRequired
}; };