search/search-custom-filters.component.ts
selector | c8y-search-custom-filters |
templateUrl | search-custom-filters.component.html |
Properties |
Methods |
Outputs |
constructor(assetSearchService: AssetSearchService)
|
||||||
Parameters :
|
customDataQuery |
Type : EventEmitter
|
refresh |
Type : EventEmitter
|
ngOnInit |
ngOnInit()
|
Returns :
void
|
onCheckboxChange |
onCheckboxChange(event: Event, checkbox: Checkbox)
|
Returns :
void
|
checkboxesState |
Type : Array<Checkbox>
|
Default value : [
{
label: gettext('All'),
name: SearchFilters.ALL_FILTERS,
value: true,
indeterminate: false,
isDisabled: true
},
{ label: gettext('Show only devices'), name: SearchFilters.ONLY_DEVICES, value: true },
{
label: gettext('Show only groups and assets'),
name: SearchFilters.ONLY_GROUPS_AND_ASSETS,
value: true
}
]
|
<label class="c8y-checkbox" *ngFor="let checkbox of checkboxesState">
<input
type="checkbox"
[checked]="checkbox.value"
[indeterminate]="checkbox.indeterminate"
(click)="onCheckboxChange($event, checkbox)"
[attr.disabled]="checkbox.isDisabled ? true : null"
/>
<span></span>
<span>{{ checkbox.label | translate }}</span>
</label>