[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

@@ -45,6 +45,7 @@ export class SearchNumberRangeComponent implements SearchWidget, OnInit {
format = '[{FROM} TO {TO}]';
isActive = false;
startValue: any;
validators: Validators;
@@ -61,8 +62,13 @@ export class SearchNumberRangeComponent implements SearchWidget, OnInit {
Validators.min(0)
]);
this.from = new FormControl('', this.validators);
this.to = new FormControl('', this.validators);
if (this.startValue) {
this.from = new FormControl(this.startValue['from'], this.validators);
this.to = new FormControl(this.startValue['to'], this.validators);
} else {
this.from = new FormControl('', this.validators);
this.to = new FormControl('', this.validators);
}
this.form = new FormGroup({
from: this.from,
@@ -108,6 +114,15 @@ export class SearchNumberRangeComponent implements SearchWidget, OnInit {
return this.form.valid;
}
getCurrentValue() {
return this.form.value;
}
setValue(value: any) {
this.form['from'].setValue(value);
this.form['to'].setValue(value);
}
reset() {
this.isActive = false;