[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

@@ -44,6 +44,8 @@ export class SearchNumberRangeComponent implements SearchWidget, OnInit {
field: string;
format = '[{FROM} TO {TO}]';
isActive = false;
validators: Validators;
ngOnInit(): void {
@@ -74,6 +76,8 @@ export class SearchNumberRangeComponent implements SearchWidget, OnInit {
apply(model: { from: string, to: string }, isValid: boolean) {
if (isValid && this.id && this.context && this.field) {
this.isActive = true;
const map = new Map<string, string>();
map.set('FROM', model.from);
map.set('TO', model.to);
@@ -97,6 +101,8 @@ export class SearchNumberRangeComponent implements SearchWidget, OnInit {
}
reset() {
this.isActive = false;
this.form.reset({
from: '',
to: ''