Desktop: Fixed scrolling issue

pull/1175/head
Laurent Cozic 2019-01-30 17:35:41 +00:00
parent a33f602f3b
commit a7aed1f93a
1 changed files with 3 additions and 1 deletions

View File

@ -60,9 +60,11 @@ class ItemList extends React.Component {
if (itemIndex < top) {
scrollTop = this.props.itemHeight * itemIndex;
} else {
scrollTop = this.props.itemHeight * itemIndex - this.visibleItemCount();
scrollTop = this.props.itemHeight * itemIndex - (this.visibleItemCount() - 1) * this.props.itemHeight;
}
if (scrollTop < 0) scrollTop = 0;
this.scrollTop_ = scrollTop;
this.listRef.current.scrollTop = scrollTop;