Fix tests and loading rows regression

This commit is contained in:
Denys Vuika 2016-07-06 16:36:22 +01:00
parent f596dd7a06
commit ae809266ea
3 changed files with 4 additions and 15 deletions

View File

@ -52,9 +52,8 @@ describe('ContentColumn', () => {
});
it('should setup screen reader title for thumbnail column', () => {
let column = new ContentColumn(columnList, {
key: '$thumbnail'
});
let column = new ContentColumn(columnList);
column.key = '$thumbnail';
column.ngOnInit();
expect(column.srTitle).toBe('Thumbnail');

View File

@ -49,17 +49,7 @@ export class ContentColumn implements OnInit, DataColumn {
@Input('class')
cssClass: string;
constructor(private list: ContentColumnList, opts?: any) {
if (opts) {
this.key = opts.key;
this.type = opts.type || 'text';
this.format = opts.format;
this.sortable = opts.sortable ? true : false;
this.title = opts.title || '';
this.srTitle = opts.srTitle;
this.cssClass = opts.cssClass;
}
}
constructor(private list: ContentColumnList) {}
ngOnInit() {
if (!this.srTitle && this.key === '$thumbnail') {

View File

@ -184,7 +184,7 @@ export class ShareDataTableAdapter implements DataTableAdapter {
}
}
this.rows = [];
this.rows = rows;
},
error => console.log(error));
}