From 78a2e497053df599240fcadb7922f92df3498639 Mon Sep 17 00:00:00 2001 From: David Baker Date: Fri, 8 Sep 2017 15:41:19 +0100 Subject: [PATCH] Don't always paginate when mounting a ScrollPanel Calling just checkFill on DidMount did not initially set the scrollTop which meant that one back pagination request is always performed regardless. This meant we would end up rending the first batch of events, then paginating and re-rendering again after the pagination got another batch, causing unnecessary render churn. --- src/components/structures/ScrollPanel.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/structures/ScrollPanel.js b/src/components/structures/ScrollPanel.js index a8a2ec181b..ae3ffe66e3 100644 --- a/src/components/structures/ScrollPanel.js +++ b/src/components/structures/ScrollPanel.js @@ -157,7 +157,7 @@ module.exports = React.createClass({ }, componentDidMount: function() { - this.checkFillState(); + this.checkScroll(); }, componentDidUpdate: function() {