Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Commit

Permalink
Save scroll state immediately before updating
Browse files Browse the repository at this point in the history
Signed-off-by: Oliver Hunt <[email protected]>
  • Loading branch information
ollieh committed Jun 12, 2017
1 parent 2df32df commit 4124a8d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/components/structures/ScrollPanel.js
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,10 @@ module.exports = React.createClass({
this.checkFillState();
},

componentWillUpdate: function(nextProps, nextState) {
this._saveScrollState();
},

componentDidUpdate: function() {
// after adding event tiles, we may need to tweak the scroll (either to
// keep at the bottom of the timeline, or to maintain the view after
Expand Down

0 comments on commit 4124a8d

Please sign in to comment.