From a4a33fe167b39aaa8a4a907ad0a309802117ee87 Mon Sep 17 00:00:00 2001 From: Mark McDowall Date: Tue, 26 Nov 2019 17:41:01 -0800 Subject: [PATCH] Fixed: Letter jump bar on series list not working correctly with banners --- frontend/src/Components/Table/VirtualTable.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/frontend/src/Components/Table/VirtualTable.js b/frontend/src/Components/Table/VirtualTable.js index 258d31b00..5d228e844 100644 --- a/frontend/src/Components/Table/VirtualTable.js +++ b/frontend/src/Components/Table/VirtualTable.js @@ -52,10 +52,10 @@ class VirtualTable extends Component { } componentDidUpdate(prevProps, preState) { - const scrollIndex = this.props.scrollIndex; + const { scrollIndex, rowHeight } = this.props; if (scrollIndex != null && scrollIndex !== prevProps.scrollIndex) { - const scrollTop = (scrollIndex + 1) * ROW_HEIGHT + 20; + const scrollTop = (scrollIndex + 1) * rowHeight + 20; this.props.onScroll({ scrollTop }); } @@ -165,6 +165,7 @@ VirtualTable.propTypes = { header: PropTypes.node.isRequired, headerHeight: PropTypes.number.isRequired, rowRenderer: PropTypes.func.isRequired, + rowHeight: PropTypes.number.isRequired, onRender: PropTypes.func.isRequired, onScroll: PropTypes.func.isRequired };