strip/modal: fix broken props nesting
This commit is contained in:
parent
ec7e4f7a09
commit
1448ddc886
2 changed files with 12 additions and 2 deletions
|
|
@ -60,7 +60,13 @@ module.exports = class Modal extends _widgets_base {
|
|||
|
||||
super({...options, html:html})
|
||||
|
||||
this.panel = new Panel({props:{...Panel.defaults(), ...options.props}, container: options.container, parent:options.parent})
|
||||
var defaults = Panel.defaults()
|
||||
for (var k in defaults) {
|
||||
if (!options.props.hasOwnProperty(k))
|
||||
options.props[k] = defaults[k]
|
||||
}
|
||||
|
||||
this.panel = new Panel(options)
|
||||
this.panel.widget.appendTo(this.widget.find('.popup-content'))
|
||||
|
||||
this.widget.hide()
|
||||
|
|
|
|||
|
|
@ -35,7 +35,11 @@ module.exports = class Strip extends Panel {
|
|||
|
||||
constructor(options) {
|
||||
|
||||
options.props = {...Panel.defaults(), ...options.props}
|
||||
var defaults = Panel.defaults()
|
||||
for (var k in defaults) {
|
||||
if (!options.props.hasOwnProperty(k))
|
||||
options.props[k] = defaults[k]
|
||||
}
|
||||
|
||||
super(options)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue