create ResizeNotifier to derive which areas of the app resize and emit

This commit is contained in:
Bruno Windels 2019-03-12 16:36:12 +01:00
parent f71a9f10dd
commit 891e343df6
10 changed files with 75 additions and 6 deletions

View file

@ -149,6 +149,8 @@ module.exports = React.createClass({
componentWillMount: function() {
this._pendingFillRequests = {b: null, f: null};
this.props.resizeNotifier.on("middlePanelResized", this.onResize);
this.resetScrollState();
},
@ -171,6 +173,7 @@ module.exports = React.createClass({
//
// (We could use isMounted(), but facebook have deprecated that.)
this.unmounted = true;
this.props.resizeNotifier.removeListener("middlePanelResized", this.onResize);
},
onScroll: function(ev) {