[ACA-3507] [ACA-3523] Fix Filters (#5821)

* fix search one letter
fix navigation
add new property search text prefix and suffix

* fix unit test

* fix unit test

* fix failing test
This commit is contained in:
Eugenio Romano
2020-06-29 17:27:52 +01:00
committed by GitHub
parent 0183f9e7f7
commit 5180493aa8
14 changed files with 102 additions and 64 deletions

View File

@@ -56,6 +56,8 @@ export class SearchDateRangeComponent implements SearchWidget, OnInit, OnDestroy
context?: SearchQueryBuilderService;
datePickerDateFormat = DEFAULT_FORMAT_DATE;
maxDate: any;
isActive = false;
private onDestroy$ = new Subject<boolean>();
constructor(private dateAdapter: DateAdapter<Moment>,
@@ -117,6 +119,8 @@ export class SearchDateRangeComponent implements SearchWidget, OnInit, OnDestroy
apply(model: { from: string, to: string }, isValid: boolean) {
if (isValid && this.id && this.context && this.settings && this.settings.field) {
this.isActive = true;
const start = moment(model.from).startOf('day').format();
const end = moment(model.to).endOf('day').format();
@@ -130,6 +134,7 @@ export class SearchDateRangeComponent implements SearchWidget, OnInit, OnDestroy
}
reset() {
this.isActive = false;
this.form.reset({
from: '',
to: ''