Merge pull request #715 from matrix-org/luke/mels-scrolling-fix
MELS: check scroll on load + use mels-1,-2,... key
This commit is contained in:
commit
8737112a8c
2 changed files with 6 additions and 1 deletions
|
@ -349,7 +349,9 @@ module.exports = React.createClass({
|
|||
<MemberEventListSummary
|
||||
key={key}
|
||||
events={summarisedEvents}
|
||||
data-scroll-token={eventId}>
|
||||
data-scroll-token={eventId}
|
||||
onToggle={this._onWidgetLoad} // Update scroll state
|
||||
>
|
||||
{eventTiles}
|
||||
</MemberEventListSummary>
|
||||
);
|
||||
|
|
|
@ -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();
|
||||
},
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue