Skip to content

Commit

Permalink
Invert the list
Browse files Browse the repository at this point in the history
  • Loading branch information
tgolen committed Aug 10, 2020
1 parent 22e3e88 commit cfc2829
Showing 1 changed file with 2 additions and 15 deletions.
17 changes: 2 additions & 15 deletions src/page/HomePage/Report/ReportHistoryView.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ const propTypes = {
class ReportHistoryView extends React.Component {
constructor(props) {
super(props);

this.scrollToBottom = _.debounce(this.scrollToBottom.bind(this), 500);
}

componentDidMount() {
Expand Down Expand Up @@ -60,18 +58,6 @@ class ReportHistoryView extends React.Component {
loaderParams: [this.props.reportID],
}
}, this);
this.scrollToBottom();
}

scrollToBottom() {
if (this.reportHistoryList) {
this.reportHistoryList.scrollToEnd({
animated: false,
});

// Scroll to the bottom again because sometimes it doesn't scroll all the way to the bottom the first time
// setTimeout(this.scrollToBottom, 250);
}
}

/**
Expand Down Expand Up @@ -113,10 +99,11 @@ class ReportHistoryView extends React.Component {
return (
<VirtualizedList
ref={el => this.reportHistoryList = el}
data={filteredHistory}
data={filteredHistory.reverse()}
getItemCount={() => filteredHistory.length}
getItem={(data, index) => filteredHistory[index]}
initialNumToRender="10"
inverted
renderItem={({index, item}) => (
<ReportHistoryItem
historyItem={item}
Expand Down

0 comments on commit cfc2829

Please sign in to comment.