Browse Source

Support custom Modal

pull/3795/head
Artur Arseniev 4 years ago
parent
commit
69e100dffa
  1. 3
      src/modal_dialog/config/config.js
  2. 4
      src/modal_dialog/index.js

3
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

4
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({

Loading…
Cancel
Save