|
|
|
@ -8,12 +8,10 @@ import { |
|
|
|
ChangeDetectionStrategy, |
|
|
|
ChangeDetectorRef, |
|
|
|
Component, |
|
|
|
EventEmitter, |
|
|
|
Input, |
|
|
|
OnChanges, |
|
|
|
OnDestroy, |
|
|
|
OnInit, |
|
|
|
Output, |
|
|
|
forwardRef |
|
|
|
} from '@angular/core'; |
|
|
|
import { |
|
|
|
@ -63,9 +61,6 @@ export class GfPortfolioFilterFormComponent |
|
|
|
@Input() tags: Filter[] = []; |
|
|
|
@Input() disabled = false; |
|
|
|
|
|
|
|
@Output() applyFilters = new EventEmitter<void>(); |
|
|
|
@Output() resetFilters = new EventEmitter<void>(); |
|
|
|
|
|
|
|
public filterForm: FormGroup; |
|
|
|
|
|
|
|
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
|
|
@ -134,17 +129,6 @@ export class GfPortfolioFilterFormComponent |
|
|
|
this.changeDetectorRef.markForCheck(); |
|
|
|
} |
|
|
|
|
|
|
|
public onApplyFilters() { |
|
|
|
this.filterForm.markAsPristine(); |
|
|
|
this.onChange(this.filterForm.value as PortfolioFilterFormValue); |
|
|
|
this.applyFilters.emit(); |
|
|
|
} |
|
|
|
|
|
|
|
public onResetFilters() { |
|
|
|
this.filterForm.reset({}, { emitEvent: true }); |
|
|
|
this.resetFilters.emit(); |
|
|
|
} |
|
|
|
|
|
|
|
public registerOnChange(fn: (value: PortfolioFilterFormValue) => void) { |
|
|
|
this.onChange = fn; |
|
|
|
} |
|
|
|
|