You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-07-31 13:44:28 +03:00
fix up scroll behaviour when loading widgets
This commit is contained in:
@ -38,6 +38,9 @@ module.exports = React.createClass({
|
||||
|
||||
/* link URL for the highlights */
|
||||
highlightLink: React.PropTypes.string,
|
||||
|
||||
/* callback for when our widget has loaded */
|
||||
onWidgetLoad: React.PropTypes.func,
|
||||
},
|
||||
|
||||
getInitialState: function() {
|
||||
@ -88,7 +91,7 @@ module.exports = React.createClass({
|
||||
var widget;
|
||||
if (this.state.link) {
|
||||
var LinkPreviewWidget = sdk.getComponent('rooms.LinkPreviewWidget');
|
||||
widget = <LinkPreviewWidget link={ this.state.link }/>;
|
||||
widget = <LinkPreviewWidget link={ this.state.link } onWidgetLoad={ this.props.onWidgetLoad }/>;
|
||||
}
|
||||
|
||||
switch (content.msgtype) {
|
||||
|
Reference in New Issue
Block a user