From: k.kedron Date: Wed, 8 Apr 2020 16:00:11 +0000 (+0200) Subject: Improved UX in the distribution component X-Git-Tag: 1.7.0~235 X-Git-Url: https://gerrit.onap.org/r/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F44%2F105544%2F2;p=sdc.git 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 --- 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; } }