Merge pull request #618 from matrix-org/rav/async_dialog
Allow Modal to be used with async-loaded components
This commit is contained in:
commit
ba2460aef4
4 changed files with 74 additions and 6 deletions
|
@ -366,10 +366,11 @@ module.exports = WithMatrixClient(React.createClass({
|
|||
},
|
||||
|
||||
onCryptoClicked: function(e) {
|
||||
var EncryptedEventDialog = sdk.getComponent("dialogs.EncryptedEventDialog");
|
||||
var event = this.props.mxEvent;
|
||||
|
||||
Modal.createDialog(EncryptedEventDialog, {
|
||||
Modal.createDialogAsync((cb) => {
|
||||
require(['../../../async-components/views/dialogs/EncryptedEventDialog'], cb)
|
||||
}, {
|
||||
event: event,
|
||||
});
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue