mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
fix empty datatable hiding the header (#3003)
This commit is contained in:
@@ -111,6 +111,19 @@ describe('DataTable', () => {
|
||||
expect(element.querySelector('.adf-datatable-header')).toBe(null);
|
||||
});
|
||||
|
||||
it('should hide the header if there are no elements inside', () => {
|
||||
let newData = new ObjectDataTableAdapter(
|
||||
);
|
||||
|
||||
dataTable.ngOnChanges({
|
||||
data: new SimpleChange(null, newData, false)
|
||||
});
|
||||
|
||||
fixture.detectChanges();
|
||||
|
||||
expect(element.querySelector('.adf-datatable-header')).toBe(null);
|
||||
});
|
||||
|
||||
it('should show the header if showHeader is true', () => {
|
||||
let newData = new ObjectDataTableAdapter(
|
||||
[
|
||||
|
Reference in New Issue
Block a user