]>
Commit | Line | Data |
---|---|---|
1 | import { Component, EventEmitter, Input, Output } from '@angular/core' | |
2 | import { Params } from '@angular/router' | |
3 | ||
4 | export type AdvancedInputFilter = { | |
5 | label: string | |
6 | queryParams: Params | |
7 | } | |
8 | ||
9 | @Component({ | |
10 | selector: 'my-advanced-input-filter', | |
11 | templateUrl: './advanced-input-filter.component.html', | |
12 | styleUrls: [ './advanced-input-filter.component.scss' ] | |
13 | }) | |
14 | export class AdvancedInputFilterComponent { | |
15 | @Input() filters: AdvancedInputFilter[] = [] | |
16 | ||
17 | @Output() resetTableFilter = new EventEmitter<void>() | |
18 | @Output() search = new EventEmitter<Event>() | |
19 | ||
20 | onSearch (event: Event) { | |
21 | this.search.emit(event) | |
22 | } | |
23 | ||
24 | onResetTableFilter () { | |
25 | this.resetTableFilter.emit() | |
26 | } | |
27 | } |