diff --git a/ui-ngx/src/app/modules/home/components/widget/lib/multiple-input-widget.component.html b/ui-ngx/src/app/modules/home/components/widget/lib/multiple-input-widget.component.html index 5dc5bc4be2..65db045157 100644 --- a/ui-ngx/src/app/modules/home/components/widget/lib/multiple-input-widget.component.html +++ b/ui-ngx/src/app/modules/home/components/widget/lib/multiple-input-widget.component.html @@ -122,7 +122,7 @@
+ *ngIf="(!entityDetected || !isAllParametersValid) && datasourceDetected">
{{ 'widgets.input-widgets.no-entity-selected' | translate }}
diff --git a/ui-ngx/src/app/modules/home/components/widget/lib/multiple-input-widget.component.ts b/ui-ngx/src/app/modules/home/components/widget/lib/multiple-input-widget.component.ts index 5ba5651511..def6404ffc 100644 --- a/ui-ngx/src/app/modules/home/components/widget/lib/multiple-input-widget.component.ts +++ b/ui-ngx/src/app/modules/home/components/widget/lib/multiple-input-widget.component.ts @@ -117,6 +117,7 @@ export class MultipleInputWidgetComponent extends PageComponent implements OnIni resetButtonLabel: string; entityDetected = false; + datasourceDetected = false; isAllParametersValid = true; multipleInputFormGroup: FormGroup; @@ -203,7 +204,8 @@ export class MultipleInputWidgetComponent extends PageComponent implements OnIni } private updateDatasources() { - if (this.datasources && this.datasources.length) { + this.datasourceDetected = this.datasources?.length !== 0; + if (this.datasourceDetected) { this.entityDetected = true; let keyIndex = 0; this.datasources.forEach((datasource) => { diff --git a/ui-ngx/src/app/modules/home/components/widget/lib/qrcode-widget.component.html b/ui-ngx/src/app/modules/home/components/widget/lib/qrcode-widget.component.html index 6423bf33ce..48f888340a 100644 --- a/ui-ngx/src/app/modules/home/components/widget/lib/qrcode-widget.component.html +++ b/ui-ngx/src/app/modules/home/components/widget/lib/qrcode-widget.component.html @@ -17,6 +17,8 @@ -->
-
entity.no-data
-
widgets.invalid-qr-code-text
+
+
entity.no-data
+
widgets.invalid-qr-code-text
+
diff --git a/ui-ngx/src/app/modules/home/components/widget/lib/qrcode-widget.component.ts b/ui-ngx/src/app/modules/home/components/widget/lib/qrcode-widget.component.ts index dff51a1378..a7c2c46911 100644 --- a/ui-ngx/src/app/modules/home/components/widget/lib/qrcode-widget.component.ts +++ b/ui-ngx/src/app/modules/home/components/widget/lib/qrcode-widget.component.ts @@ -54,6 +54,7 @@ export class QrCodeWidgetComponent extends PageComponent implements OnInit, Afte qrCodeText: string; invalidQrCodeText = false; + datasourceDetected = false; private viewInited: boolean; private scheduleUpdateCanvas: boolean; @@ -95,6 +96,8 @@ export class QrCodeWidgetComponent extends PageComponent implements OnInit, Afte data: [] } ]; + } else { + this.datasourceDetected = false; } if (initialData) { const data = parseData(initialData); @@ -103,6 +106,7 @@ export class QrCodeWidgetComponent extends PageComponent implements OnInit, Afte safeExecute(this.qrCodeTextFunction, [dataSourceData]) : this.settings.qrCodeTextPattern; const replaceInfo = processPattern(pattern, dataSourceData); qrCodeText = fillPattern(pattern, replaceInfo, dataSourceData); + this.datasourceDetected = true; } this.updateQrCodeText(qrCodeText); } diff --git a/ui-ngx/src/app/modules/home/components/widget/lib/rpc/switch.component.scss b/ui-ngx/src/app/modules/home/components/widget/lib/rpc/switch.component.scss index d5f5e2be56..293246c79e 100644 --- a/ui-ngx/src/app/modules/home/components/widget/lib/rpc/switch.component.scss +++ b/ui-ngx/src/app/modules/home/components/widget/lib/rpc/switch.component.scss @@ -45,6 +45,7 @@ $error-height: 14px !default; font-weight: 500; color: #757575; white-space: nowrap; + z-index: 1; .off-label { color: #b7b5b5; @@ -86,6 +87,8 @@ $error-height: 14px !default; :host ::ng-deep { .tb-switch { .switch { + z-index: 1; + mat-slide-toggle { position: absolute; top: 0;