mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-07-31 17:38:28 +00:00
workaround for search settings reset (#466)
This commit is contained in:
@@ -67,6 +67,7 @@ export class SearchComponent extends PageComponent implements OnInit {
|
||||
super.ngOnInit();
|
||||
|
||||
this.sorting = this.getSorting();
|
||||
this.resetSettings();
|
||||
|
||||
this.subscriptions.push(
|
||||
this.queryBuilder.updated.subscribe(() => {
|
||||
@@ -94,6 +95,20 @@ export class SearchComponent extends PageComponent implements OnInit {
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: workaround for ADF 2.4.0 bug
|
||||
private resetSettings() {
|
||||
this.queryBuilder.categories
|
||||
.map(category => category.component)
|
||||
.filter(component => component.selector === 'check-list')
|
||||
.map(component => component.settings.options || [])
|
||||
.reduce((acc, value) => acc.concat(value), [])
|
||||
.forEach(value => {
|
||||
if (value.hasOwnProperty('checked')) {
|
||||
value.checked = false;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private formatSearchQuery(userInput: string) {
|
||||
if (!userInput) {
|
||||
return null;
|
||||
|
Reference in New Issue
Block a user