matrix: if scroll is true, children's values no longer feed the matrix' value and onValue script, it will be used for scrolling state, like with panels
This commit is contained in:
parent
de9b5db120
commit
714bdddb96
3 changed files with 14 additions and 14 deletions
|
|
@ -45,24 +45,24 @@ class Matrix extends Panel {
|
|||
|
||||
this.resolveLock = false
|
||||
|
||||
this.on('value-changed',(e)=>{
|
||||
if (!this.getProp('scroll')) {
|
||||
this.on('value-changed',(e)=>{
|
||||
|
||||
if (e.widget === this) return
|
||||
if (e.widget === this) return
|
||||
|
||||
var widget = this.getProp('widgetType') === 'clone' ? e.widget.parent : e.widget
|
||||
var widget = this.getProp('widgetType') === 'clone' ? e.widget.parent : e.widget
|
||||
|
||||
if (widget.parent !== this) return
|
||||
if (widget.parent !== this) return
|
||||
|
||||
this.value[widget._index] = e.widget.getValue()
|
||||
this.value[widget._index] = e.widget.getValue()
|
||||
|
||||
this.changed({
|
||||
...e.options,
|
||||
id: widget.getProp('id')
|
||||
})
|
||||
|
||||
this.changed({
|
||||
...e.options,
|
||||
id: widget.getProp('id')
|
||||
})
|
||||
|
||||
})
|
||||
|
||||
|
||||
}
|
||||
|
||||
if (parser.widgets[this.getProp('widgetType')]) {
|
||||
|
||||
|
|
|
|||
|
|
@ -274,7 +274,7 @@ class Panel extends Container() {
|
|||
if (options.send) this.sendValue()
|
||||
if (options.sync) this.changed(options)
|
||||
|
||||
} else if (this.childrenType === 'widget' && Array.isArray(v) && v.length === 2 && this.props.type !== 'modal') {
|
||||
} else if (this.getProp('scroll') && this.childrenType !== 'tab' && Array.isArray(v) && v.length === 2 && this.props.type !== 'modal') {
|
||||
|
||||
this.value = v
|
||||
clearTimeout(this.scrollTimeout)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue