mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-31 17:38:48 +00:00
[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:
@@ -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: ''
|
||||
|
Reference in New Issue
Block a user