matrix: avanced property issue inprops property

This commit is contained in:
jean-emmanuel 2022-03-02 15:28:20 +01:00
parent 7960aa7048
commit 1563dd12a5
2 changed files with 12 additions and 5 deletions

View file

@ -1,5 +1,10 @@
# Changelog
## 1.15.4
- bug fixes
- matrix: avanced property issue in`props` property
## 1.15.3
- bug fixes

View file

@ -41,6 +41,8 @@ class Matrix extends Panel {
this.value = []
this.resolveLock = false
this.on('value-changed',(e)=>{
if (e.widget === this) return
@ -172,20 +174,20 @@ class Matrix extends Panel {
resolveProp(propName, propValue, storeLinks, originalWidget, originalPropName, context) {
if (propName === 'props') {
if (propName === 'props' && !this.resolveLock) {
this.resolveLock = true
propValue = propValue !== undefined ? propValue : deepCopy(this.props[propName])
if (typeof propValue === 'object' && propValue !== null) {
propValue = JSON.stringify(propValue)
}
var data = [],
quantity = this.resolveProp('quantity', undefined, false, false, false)
for (var i = 0; i < quantity; i++) {
data[i] = super.resolveProp(propName, propValue, i === 0 ? storeLinks : false, originalWidget, originalPropName, {$: i})
}
this.resolveLock = false
return data
} else {