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', () => { it('should setup screen reader title for thumbnail column', () => {
let column = new ContentColumn(columnList, { let column = new ContentColumn(columnList);
key: '$thumbnail' column.key = '$thumbnail';
});
column.ngOnInit(); column.ngOnInit();
expect(column.srTitle).toBe('Thumbnail'); expect(column.srTitle).toBe('Thumbnail');

View File

@ -49,17 +49,7 @@ export class ContentColumn implements OnInit, DataColumn {
@Input('class') @Input('class')
cssClass: string; cssClass: string;
constructor(private list: ContentColumnList, opts?: any) { constructor(private list: ContentColumnList) {}
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;
}
}
ngOnInit() { ngOnInit() {
if (!this.srTitle && this.key === '$thumbnail') { 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)); error => console.log(error));
} }