From bb8a61b60e9b80b1dd1e137533c48fb569b89f9a Mon Sep 17 00:00:00 2001 From: "k.kedron" Date: Wed, 8 Apr 2020 18:00:11 +0200 Subject: Improved UX in the distribution component Added new logic to expand currently open tab, after clicking the refresh button. Issue-ID: SDC-2886 Signed-off-by: Krystian Kedron Change-Id: Ib9d1c7cbf2ca2dd9df22f7f74ffda64144c06047 --- .../ng2/pages/workspace/disribution/distribution.component.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'catalog-ui') diff --git a/catalog-ui/src/app/ng2/pages/workspace/disribution/distribution.component.ts b/catalog-ui/src/app/ng2/pages/workspace/disribution/distribution.component.ts index ca1b6292d3..eb55fa1de7 100644 --- a/catalog-ui/src/app/ng2/pages/workspace/disribution/distribution.component.ts +++ b/catalog-ui/src/app/ng2/pages/workspace/disribution/distribution.component.ts @@ -87,6 +87,16 @@ export class DistributionComponent implements OnInit { private async refreshDistributions() { await this.initDistributions(this.componentUuid); + this.openExpanded(); + } + + private openExpanded() { + const self = this; + this.distributions.forEach((row) => { + if (self.expanded[row.distributionID]) { + self.expandRow(row, false); + } + }) } private updateFilter(event) { @@ -113,5 +123,6 @@ export class DistributionComponent implements OnInit { await this.distributionService.initDistributionsStatusForDistributionID(row.distributionID); } this.table.rowDetail.toggleExpandRow(row); + this.expanded[row.distributionID] = !expanded; } } -- cgit 1.2.3-korg