mirror of https://github.com/vector-im/riot-web
Merge pull request #715 from matrix-org/luke/mels-scrolling-fix
MELS: check scroll on load + use mels-1,-2,... keypull/21833/head
commit
8737112a8c
|
@ -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 New Issue