Skip to content

Commit

Permalink
mgr/dashboard: datatable in Cluster Host page hides wrong column on s…
Browse files Browse the repository at this point in the history
…election

Signed-off-by: Sarthak0702 <[email protected]>
  • Loading branch information
Sarthak0702 committed Apr 7, 2022
1 parent a98c247 commit 3fe39de
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,6 @@ export class HostsComponent extends ListWithDetails implements OnDestroy, OnInit
} else {
// mark host facts columns unavailable
for (let column = 4; column < this.columns.length; column++) {
this.columns[column]['prop'] = '';
this.columns[column]['cellTemplate'] = this.orchTmpl;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -513,6 +513,15 @@ describe('TableComponent', () => {
equalStorageConfig();
});

it('should toggle on off columns', () => {
for (const column of component.columns) {
component.toggleColumn(column);
expect(column.isHidden).toBeTruthy();
component.toggleColumn(column);
expect(column.isHidden).toBeFalsy();
}
});

afterEach(() => {
clearLocalStorage();
});
Expand Down

0 comments on commit 3fe39de

Please sign in to comment.