[ADF-2457] Comment component - Hide the table header ()

* Added showHeader input property in adf-datatable  to hide header in comment-list component.
This commit is contained in:
camorra-skk 2018-03-09 19:19:20 +05:30 committed by Eugenio Romano
parent 487147ca22
commit 16a8fa8cd8
2 changed files with 10 additions and 0 deletions

@ -1,5 +1,6 @@
<adf-datatable
[rows]="comments"
[showHeader]="false"
(rowClick)="selectComment($event)" *ngIf="hasComments()">
<data-columns>

@ -133,4 +133,13 @@ describe('CommentListComponent', () => {
expect(elements[0].innerText).toContain(commentList.getUserShortName(testComment.createdBy));
expect(fixture.nativeElement.querySelector('#comment-user-icon:empty')).toBeNull();
});
it('should hide the datatable header in comment-list as showHeader is false', (done) => {
fixture.detectChanges();
fixture.whenStable().then(() => {
fixture.detectChanges();
expect(element.querySelector('.adf-datatable-header')).toBe(null);
done();
});
});
});