diff --git a/src/components/structures/MessagePanel.js b/src/components/structures/MessagePanel.js index dcebe38fa4..9398a21516 100644 --- a/src/components/structures/MessagePanel.js +++ b/src/components/structures/MessagePanel.js @@ -349,7 +349,9 @@ module.exports = React.createClass({ + data-scroll-token={eventId} + onToggle={this._onWidgetLoad} // Update scroll state + > {eventTiles} ); diff --git a/src/components/views/elements/MemberEventListSummary.js b/src/components/views/elements/MemberEventListSummary.js index 510d861730..a3c31ae65b 100644 --- a/src/components/views/elements/MemberEventListSummary.js +++ b/src/components/views/elements/MemberEventListSummary.js @@ -30,6 +30,8 @@ module.exports = React.createClass({ avatarsMaxLength: React.PropTypes.number, // The minimum number of events needed to trigger summarisation threshold: React.PropTypes.number, + // Called when the MELS expansion is toggled + onToggle: React.PropTypes.func, }, getInitialState: function() { @@ -63,6 +65,7 @@ module.exports = React.createClass({ this.setState({ expanded: !this.state.expanded, }); + this.props.onToggle(); }, /**