diff --git a/src/client/widgets/common/widget.js b/src/client/widgets/common/widget.js index 0b060835..fc1fff1b 100644 --- a/src/client/widgets/common/widget.js +++ b/src/client/widgets/common/widget.js @@ -183,10 +183,17 @@ class Widget extends EventEmitter { this.createPropsCache() if (this.getProp('id') == 'root' && this.parent !== widgetManager) { + this.props.id = '_root' this.cachedProps.id = '_root' - this.errors.id = 'There can only be one root' } + if (this.getProp('type') == 'root' && this.parent !== widgetManager) { + this.props.type = 'panel' + this.cachedProps.type = 'panel' + } + + + // cache decimals if (this.props.decimals !== undefined) { this.decimals = Math.min(20, Math.max(this.getProp('decimals'), 0))