[ADF-242] Select the first in the list when the report is deleted (#1862)

* ADF-242 Select the first in the list when the report is deleted

* Update README.md
This commit is contained in:
Maurizio Vitale
2017-05-09 15:46:58 +02:00
committed by Eugenio Romano
parent 22bbffdb21
commit e09d317d1e
4 changed files with 19 additions and 10 deletions

View File

@@ -149,6 +149,7 @@
<hr>
<analytics-report-list
[appId]="appId"
[selectFirst]="selectFirstReport"
(reportClick)="onReportClick($event)"
#analyticsreportlist>
</analytics-report-list>

View File

@@ -79,6 +79,7 @@ export class ActivitiDemoComponent implements AfterViewInit {
appId: number = null;
fileShowed: boolean = false;
selectFirstReport: boolean = false;
content: Blob;
contentName: string;
@@ -213,14 +214,8 @@ export class ActivitiDemoComponent implements AfterViewInit {
}
onReportDeleted() {
this.selectFirstReport = true;
this.analyticsreportlist.reload();
this.selectFirstElementInReportList();
}
selectFirstElementInReportList() {
if (!this.analyticsreportlist.isReportsEmpty()) {
this.analyticsreportlist.selectReport(this.analyticsreportlist.reports[0]);
}
}
navigateStartProcess() {