core/forms/filter-input.component.ts
selector | c8y-filter |
templateUrl | ./filter-input.component.html |
Properties |
Methods |
Inputs |
Outputs |
icon |
Type : string
|
onSearch |
Type : EventEmitter
|
ngOnDestroy |
ngOnDestroy()
|
Returns :
void
|
ngOnInit |
ngOnInit()
|
Returns :
void
|
reset |
reset()
|
Returns :
void
|
filterChange$ |
Default value : new Subject()
|
filterTerm |
Type : string
|
Default value : ''
|
<div class="input-group input-group-search">
<input
class="form-control"
placeholder="{{ 'Filter…' | translate }}"
type="text"
[value]="filterTerm"
(keyup)="filterChange$.next($event)"
px-event="Filter…"
/>
<span class="input-group-btn">
<button class="btn btn-clean" px-event="Clear filtering" (click)="reset()">
<i [c8yIcon]="filterTerm.length === 0 ? 'search' : 'close'"></i>
</button>
</span>
</div>