Ammends
gitea/salix/pipeline/head This commit looks good
Details
gitea/salix/pipeline/head This commit looks good
Details
This commit is contained in:
parent
52d7b4f600
commit
7a5e7b4c20
|
@ -246,7 +246,7 @@ export default class SmartTable extends Component {
|
|||
if (!existingCriteria) {
|
||||
const priority = this.sortCriteria.length + 1;
|
||||
|
||||
this.sortCriteria.push({field: field, sortType: 'ASC', priority: 1});
|
||||
this.sortCriteria.push({field: field, sortType: 'ASC', priority: priority});
|
||||
element.classList.remove('desc');
|
||||
element.classList.add('asc');
|
||||
|
||||
|
|
|
@ -116,9 +116,10 @@ describe('Component smartTable', () => {
|
|||
expect(firstSortCriteria.field).toEqual('test1');
|
||||
expect(firstSortCriteria.sortType).toEqual('ASC');
|
||||
expect(firstSortCriteria.priority).toEqual(1);
|
||||
|
||||
expect(secondSortCriteria.field).toEqual('id');
|
||||
expect(secondSortCriteria.sortType).toEqual('DESC');
|
||||
expect(firstSortCriteria.priority).toEqual(2);
|
||||
expect(secondSortCriteria.priority).toEqual(2);
|
||||
});
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in New Issue