diff --git a/src/modal_dialog/config/config.js b/src/modal_dialog/config/config.js index 8eb7e548c..b2fbd9f43 100644 --- a/src/modal_dialog/config/config.js +++ b/src/modal_dialog/config/config.js @@ -7,6 +7,9 @@ export default { backdrop: true, + // Avoid rendering the default modal. + custom: false, + /** * Extend ModalView object (view/ModalView.js) * @example diff --git a/src/modal_dialog/index.js b/src/modal_dialog/index.js index 67fc500da..742d92607 100644 --- a/src/modal_dialog/index.js +++ b/src/modal_dialog/index.js @@ -75,7 +75,8 @@ export default () => { postRender(view) { const el = view.model.getConfig().el || view.el; - this.render().appendTo(el); + const res = this.render(); + res && res.appendTo(el); }, /** @@ -198,6 +199,7 @@ export default () => { * @private */ render() { + if (this.getConfig().custom) return; const View = ModalView.extend(c.extend); modal && modal.remove(); modal = new View({