diff --git a/src/client/widgets/common/widget.js b/src/client/widgets/common/widget.js index 0ffbd91c..37892089 100644 --- a/src/client/widgets/common/widget.js +++ b/src/client/widgets/common/widget.js @@ -509,11 +509,6 @@ class Widget extends EventEmitter { jsScope = context || {}, varnumber = 999 - - if (typeof propValue === 'object' && propValue !== null) { - propValue = JSON.stringify(propValue) - } - if (typeof propValue == 'string') { propValue = balancedReplace('@', '{', '}', propValue, (content)=>{ @@ -777,6 +772,10 @@ class Widget extends EventEmitter { } catch (err) {} } + } else if (propValue != null && typeof propValue == 'object') { + for (let k in propValue) { + propValue[k] = this.resolveProp(propName, propValue[k], storeLinks, originalWidget, originalPropName, context) + } } return propValue diff --git a/src/client/widgets/containers/matrix.js b/src/client/widgets/containers/matrix.js index 169285ae..4b6fc4f2 100644 --- a/src/client/widgets/containers/matrix.js +++ b/src/client/widgets/containers/matrix.js @@ -170,6 +170,12 @@ class Matrix extends Panel { if (propName === 'props') { + propValue = propValue !== undefined ? propValue : deepCopy(this.props[propName]) + + if (typeof propValue === 'object' && propValue !== null) { + propValue = JSON.stringify(propValue) + } + var data = [] for (var i = 0; i < this.getProp('quantity'); i++) { data[i] = super.resolveProp(propName, propValue, storeLinks, originalWidget, originalPropName, {$: i})