mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ADF-4280] fix initial display for search-sorting-picker (#4522)
* [ADF-4280] fix initial display for search-sorting-picker * [ADF-4280] fix unrelated error TS6133: 'renderingQueueServices' is declared but its value is never read * [ADF-4280] update e2e test
This commit is contained in:
committed by
Eugenio Romano
parent
95ee2bca71
commit
888113fdc2
@@ -40,7 +40,7 @@ describe('SearchSortingPickerComponent', () => {
|
||||
<any> { 'key': 'description', 'label': 'Description', 'type': 'FIELD', 'field': 'cm:description', 'ascending': true }
|
||||
],
|
||||
defaults: [
|
||||
<any> { 'key': 'name', 'type': 'FIELD', 'field': 'cm:name', 'ascending': true }
|
||||
<any> { 'key': 'name', 'type': 'FIELD', 'field': 'cm:name', 'ascending': false }
|
||||
]
|
||||
},
|
||||
categories: [
|
||||
@@ -64,7 +64,7 @@ describe('SearchSortingPickerComponent', () => {
|
||||
component.ngOnInit();
|
||||
|
||||
expect(component.value).toEqual('name');
|
||||
expect(component.ascending).toBeTruthy();
|
||||
expect(component.ascending).toBe(false);
|
||||
});
|
||||
|
||||
it('should update query builder each time selection is changed', () => {
|
||||
|
@@ -39,7 +39,7 @@ export class SearchSortingPickerComponent implements OnInit {
|
||||
const primary = this.queryBuilder.getPrimarySorting();
|
||||
if (primary) {
|
||||
this.value = primary.key;
|
||||
this.ascending = this.getSortingOrder();
|
||||
this.ascending = primary.ascending;
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user