TSK-1383: Solving error in monitor when clicking on last entry in table
This commit is contained in:
parent
72476bc76d
commit
4fd7423575
|
@ -1,4 +1,4 @@
|
||||||
import { Component, Input, OnInit } from '@angular/core';
|
import { Component, Input } from '@angular/core';
|
||||||
import { ReportData } from 'app/monitor/models/report-data';
|
import { ReportData } from 'app/monitor/models/report-data';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
|
@ -6,18 +6,16 @@ import { ReportData } from 'app/monitor/models/report-data';
|
||||||
templateUrl: './report-table.component.html',
|
templateUrl: './report-table.component.html',
|
||||||
styleUrls: ['./report-table.component.scss']
|
styleUrls: ['./report-table.component.scss']
|
||||||
})
|
})
|
||||||
export class ReportTableComponent implements OnInit {
|
export class ReportTableComponent {
|
||||||
currentExpHeaders = 0;
|
currentExpHeaders = 0;
|
||||||
|
|
||||||
@Input()
|
@Input()
|
||||||
reportData: ReportData;
|
reportData: ReportData;
|
||||||
|
|
||||||
ngOnInit(): void {}
|
|
||||||
|
|
||||||
toggleFold(indexNumber: number, sumRow: boolean = false) {
|
toggleFold(indexNumber: number, sumRow: boolean = false) {
|
||||||
let rows = sumRow ? this.reportData.sumRow : this.reportData.rows;
|
let rows = sumRow ? this.reportData.sumRow : this.reportData.rows;
|
||||||
let index = indexNumber;
|
let index = indexNumber;
|
||||||
const toggleRow = rows[(index += 1)];
|
const toggleRow = rows[index];
|
||||||
if (toggleRow.depth < this.reportData.meta.rowDesc.length - 1) {
|
if (toggleRow.depth < this.reportData.meta.rowDesc.length - 1) {
|
||||||
const firstChildRow = rows[(index += 1)];
|
const firstChildRow = rows[(index += 1)];
|
||||||
firstChildRow.display = !firstChildRow.display;
|
firstChildRow.display = !firstChildRow.display;
|
||||||
|
|
Loading…
Reference in New Issue