mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
Fix remove default sorting on the fist column
This commit is contained in:
committed by
Mario Romano
parent
b0749e9ed3
commit
d905aaa0cf
@@ -229,7 +229,7 @@ describe('ObjectDataTableAdapter', () => {
|
||||
expect(rows[1].getValue('id')).toBe(1);
|
||||
});
|
||||
|
||||
it('should sort by first column if no sortable found', () => {
|
||||
it('should be sorting undefined if no sortable found', () => {
|
||||
let adapter = new ObjectDataTableAdapter(
|
||||
[
|
||||
{ id: 2, name: 'abs' },
|
||||
@@ -241,12 +241,7 @@ describe('ObjectDataTableAdapter', () => {
|
||||
]
|
||||
);
|
||||
|
||||
expect(adapter.getSorting()).toEqual(
|
||||
jasmine.objectContaining({
|
||||
key: 'id',
|
||||
direction: 'asc'
|
||||
})
|
||||
);
|
||||
expect(adapter.getSorting()).toBeUndefined();
|
||||
});
|
||||
|
||||
it('should sort asc and desc', () => {
|
||||
|
@@ -74,8 +74,6 @@ export class ObjectDataTableAdapter implements DataTableAdapter {
|
||||
let sortable = this._columns.filter(c => c.sortable);
|
||||
if (sortable.length > 0) {
|
||||
this.sort(sortable[0].key, 'asc');
|
||||
} else {
|
||||
this.sort(this._columns[0].key, 'asc');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user