diff --git a/bundles/org.openhab.ui/web/src/components/widgets/modals/modal-mixin.js b/bundles/org.openhab.ui/web/src/components/widgets/modals/modal-mixin.js index 1b723f5310..912e6e246e 100644 --- a/bundles/org.openhab.ui/web/src/components/widgets/modals/modal-mixin.js +++ b/bundles/org.openhab.ui/web/src/components/widgets/modals/modal-mixin.js @@ -23,7 +23,8 @@ export default { root: component, store: this.$store.getters.trackedItems, props: this.modalConfig, - vars: this.vars + vars: this.vars, + modalConfig: this.modalConfig // For configuration of oh- components } }, modalStyle () { diff --git a/bundles/org.openhab.ui/web/src/components/widgets/widget-mixin.js b/bundles/org.openhab.ui/web/src/components/widgets/widget-mixin.js index 7aa459e7ce..c528e008ef 100644 --- a/bundles/org.openhab.ui/web/src/components/widgets/widget-mixin.js +++ b/bundles/org.openhab.ui/web/src/components/widgets/widget-mixin.js @@ -59,8 +59,9 @@ export default { config () { if (!this.context || !this.context.component) return null let evalConfig = {} - if (this.context.component.config) { - const sourceConfig = this.context.component.config + // Fallback to modelConfig for oh- components to allow configuring them in modals + const sourceConfig = this.context.component.config || (this.componentType.startsWith('oh-') ? this.context.modalConfig : {}) + if (sourceConfig) { if (typeof sourceConfig !== 'object') return {} for (const key in sourceConfig) { if (key === 'visible' || key === 'visibleTo' || key === 'stylesheet') continue