[ACA-3506] - Filter are kept when reloaded (#5885)

* [ADF] - saving in the url the filter values

* Fixed filter status on refresh

* Fixed filter status on refresh

* [ACA-3506] - added url filtering save

* [ACA-3506] - fixed spellcheck

* improve log

* more log

* fix scripts

* Added documentation for allowUpdateOnChange setting

* Added default value in description for docs

Co-authored-by: Vito Albano <vitoalbano@Vitos-MacBook-Pro.local>
Co-authored-by: Eugenio Romano <eugenio.romano@alfresco.com>
This commit is contained in:
Vito
2020-07-20 11:39:51 +01:00
committed by GitHub
parent 44c5472fa2
commit 3b7f3a5762
33 changed files with 316 additions and 122 deletions

View File

@@ -47,6 +47,7 @@ export class SearchRadioComponent implements SearchWidget, OnInit {
options: SearchFilterList<SearchRadioOption>;
pageSize = 5;
isActive = false;
startValue: any;
constructor() {
this.options = new SearchFilterList<SearchRadioOption>();
@@ -64,8 +65,11 @@ export class SearchRadioComponent implements SearchWidget, OnInit {
}
const initialValue = this.getSelectedValue();
if (initialValue !== null) {
this.setValue(initialValue);
} else if (this.startValue !== null) {
this.setValue(initialValue);
}
}
@@ -93,12 +97,16 @@ export class SearchRadioComponent implements SearchWidget, OnInit {
return !!currentValue;
}
private setValue(newValue: string) {
setValue(newValue: string) {
this.value = newValue;
this.context.queryFragments[this.id] = newValue;
this.context.update();
}
getCurrentValue() {
return this.getSelectedValue();
}
changeHandler(event: MatRadioChange) {
this.setValue(event.value);
}