diff --git a/js/src/common/components/Modal.js b/js/src/common/components/Modal.js index 637a100d9..d1a5adc77 100644 --- a/js/src/common/components/Modal.js +++ b/js/src/common/components/Modal.js @@ -14,7 +14,7 @@ export default class Modal extends Component { */ static isDismissible = true; - init() { + oninit() { /** * Attributes for an alert component to show below the header. * @@ -23,17 +23,11 @@ export default class Modal extends Component { this.alertAttrs = null; } - config(isInitialized, context) { - if (isInitialized) return; - - this.props.onshow(() => this.onready()); - - context.onunload = () => { - this.props.onhide(); - }; + oncreate(vnode) { + vnode.attrs.onshow(() => this.onready(vnode.attrs)); } - view() { + view(vnode) { if (this.alertAttrs) { this.alertAttrs.dismissible = false; } @@ -45,7 +39,7 @@ export default class Modal extends Component {