From 909c8801c5021322acb0dd53aa9607e211426bfd Mon Sep 17 00:00:00 2001 From: Igor Kulikov Date: Tue, 31 Aug 2021 19:40:00 +0300 Subject: [PATCH] Update attribute-table.component.ts --- .../home/components/attribute/attribute-table.component.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/ui-ngx/src/app/modules/home/components/attribute/attribute-table.component.ts b/ui-ngx/src/app/modules/home/components/attribute/attribute-table.component.ts index 36326c464b..5694cc5c77 100644 --- a/ui-ngx/src/app/modules/home/components/attribute/attribute-table.component.ts +++ b/ui-ngx/src/app/modules/home/components/attribute/attribute-table.component.ts @@ -443,14 +443,13 @@ export class AttributeTableComponent extends PageComponent implements AfterViewI } onWidgetsBundleChanged(widgetsBundle: WidgetsBundle) { + this.widgetBundleSet = !!widgetsBundle; if (this.mode === 'widget') { this.widgetsList = []; this.widgetsListCache = []; - this.widgetsCarouselIndex = 0; - this.widgetBundleSet = false; + this.widgetsCarouselIndex = 0; if (widgetsBundle) { this.widgetsLoaded = false; - this.widgetBundleSet = true; const bundleAlias = widgetsBundle.alias; const isSystem = widgetsBundle.tenantId.id === NULL_UUID; this.widgetService.getBundleWidgetTypes(bundleAlias, isSystem).subscribe( @@ -515,7 +514,6 @@ export class AttributeTableComponent extends PageComponent implements AfterViewI exitWidgetMode() { this.selectedWidgetsBundleAlias = null; - this.widgetBundleSet = false; this.mode = 'default'; }