core/forms/filter-input.component.ts
OnInit
OnDestroy
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…"
data-cy="filter-input--filter-input"
/>
<span class="input-group-btn">
<button class="btn btn-clean" title="{{filterTerm.length === 0 ? ('search' | translate) : ('close' | translate)}}" px-event="Clear filtering" (click)="reset()">
<i [c8yIcon]="filterTerm.length === 0 ? 'search' : 'close'"></i>
</button>
</span>
</div>