{{widgetsBundle.title}}
diff --git a/ui-ngx/src/app/shared/components/widgets-bundle-select.component.ts b/ui-ngx/src/app/shared/components/widgets-bundle-select.component.ts
index 28d15b45a2..271db6d26a 100644
--- a/ui-ngx/src/app/shared/components/widgets-bundle-select.component.ts
+++ b/ui-ngx/src/app/shared/components/widgets-bundle-select.component.ts
@@ -20,12 +20,12 @@ import { Observable } from 'rxjs';
import { map, share, tap } from 'rxjs/operators';
import { Store } from '@ngrx/store';
import { AppState } from '@app/core/core.state';
-import { coerceBooleanProperty } from '@angular/cdk/coercion';
import { WidgetsBundle } from '@shared/models/widgets-bundle.model';
import { WidgetService } from '@core/http/widget.service';
import { isDefined } from '@core/utils';
import { NULL_UUID } from '@shared/models/id/has-uuid';
import { getCurrentAuthState } from '@core/auth/auth.selectors';
+import { coerceBoolean } from '@shared/decorators/coercion';
@Component({
selector: 'tb-widgets-bundle-select',
@@ -44,19 +44,15 @@ export class WidgetsBundleSelectComponent implements ControlValueAccessor, OnIni
bundlesScope: 'system' | 'tenant';
@Input()
+ @coerceBoolean()
selectFirstBundle: boolean;
@Input()
selectBundleAlias: string;
- private requiredValue: boolean;
- get required(): boolean {
- return this.requiredValue;
- }
@Input()
- set required(value: boolean) {
- this.requiredValue = coerceBooleanProperty(value);
- }
+ @coerceBoolean()
+ required: boolean;
@Input()
disabled: boolean;
@@ -70,7 +66,8 @@ export class WidgetsBundleSelectComponent implements ControlValueAccessor, OnIni
widgetsBundle: WidgetsBundle | null;
- private propagateChange = (v: any) => { };
+ onTouched = () => {};
+ private propagateChange: (value: any) => void = () => {};
constructor(private store: Store
,
private widgetService: WidgetService) {
@@ -81,6 +78,7 @@ export class WidgetsBundleSelectComponent implements ControlValueAccessor, OnIni
}
registerOnTouched(fn: any): void {
+ this.onTouched = fn;
}
ngOnInit() {