device-grid/device-grid.component.ts
selector | c8y-device-grid |
templateUrl | ./device-grid.component.html |
Properties |
Methods |
Inputs |
Outputs |
Accessors |
constructor(deviceGridService: DeviceGridService)
|
||||||
Parameters :
|
actionControls
|
Type : |
baseQuery
|
Type :
Default value : |
bulkActionControls
|
Type : |
childDeviceGrid
|
Type :
Default value : |
columns
|
Type : |
dataCallback
|
Optional callback function that allows to modify server side data result before it's rendered.
Type : |
infiniteScroll
|
loadingItemsLabel
|
Type :
Default value : |
loadMoreItemsLabel
|
Default value : |
pagination
|
parentDeviceId
|
Type : |
refresh
|
Type : |
selectable
|
Type :
Default value : |
showChildDevices
|
Determines if additional "Show child devices" toggle should be shown and in what state it should be.
Type :
Default value : |
title
|
Type :
Default value : |
itemsSelect
|
$event Type: EventEmitter
|
onChildDevices
|
$event Type: EventEmitter
|
onColumnsChange
|
Emits an event when columns configuration changes. $event Type: EventEmitter<DeviceGridColumn[]>
|
onDeviceQueryStringChange
|
$event Type: EventEmitter<string>
|
configChange | ||||||
configChange(config: GridConfig)
|
||||||
Parameters :
Returns :
void
|
ngOnInit |
ngOnInit()
|
Returns :
void
|
Async onDataSourceModifier | ||||||
onDataSourceModifier(dataSourceModifier: DataSourceModifier)
|
||||||
Parameters :
Returns :
Promise<ServerSideDataResult>
|
Async onDeleteDevice | ||||
onDeleteDevice(device)
|
||||
Parameters :
Returns :
any
|
Async setActionControls |
setActionControls()
|
Returns :
any
|
trackByName | |||||||||
trackByName(_index, column: DeviceGridColumn)
|
|||||||||
Parameters :
Returns :
string
|
updateFiltering | |||||||||
updateFiltering(columnNames: string[], action: literal type)
|
|||||||||
Parameters :
Returns :
void
|
actionControls |
actionControls:
|
Type : ActionControl[]
|
Default value : []
|
bulkActionControls |
bulkActionControls:
|
Type : BulkActionControl[]
|
Default value : this.deviceGridService.getDefaultBulkActionControls()
|
columns |
columns:
|
Type : DeviceGridColumn[]
|
Default value : this.deviceGridService.getDefaultColumns()
|
dataGrid |
dataGrid:
|
Type : DataGridComponent
|
Decorators :
@ViewChild(DataGridComponent, {static: undefined})
|
Public deviceGridService |
deviceGridService:
|
Type : DeviceGridService
|
infiniteScroll |
infiniteScroll:
|
Type : LoadMoreMode
|
pagination |
pagination:
|
Type : Pagination
|
Default value : this.deviceGridService.getDefaultPagination()
|
serverSideDataCallback |
serverSideDataCallback:
|
Type : any
|
withChildren |
withChildren:
|
Type : boolean
|
Default value : false
|
_columns | ||||||
set_columns(value: [])
|
||||||
Parameters :
Returns :
void
|
_pagination | ||||
set_pagination(value)
|
||||
Parameters :
Returns :
void
|
_infiniteScroll | ||||
set_infiniteScroll(infiniteScroll)
|
||||
Parameters :
Returns :
void
|
_actionControls | ||||||
set_actionControls(value: [])
|
||||||
Parameters :
Returns :
void
|
_bulkActionControls | ||||||
set_bulkActionControls(value: [])
|
||||||
Parameters :
Returns :
void
|
<c8y-data-grid
[title]="title"
[loadMoreItemsLabel]="loadMoreItemsLabel"
[loadingItemsLabel]="loadingItemsLabel"
[columns]="columns"
[pagination]="pagination"
[infiniteScroll]="infiniteScroll"
[actionControls]="actionControls"
[selectable]="selectable"
[bulkActionControls]="bulkActionControls"
[serverSideDataCallback]="serverSideDataCallback"
(itemsSelect)="itemsSelect.emit($event)"
(onConfigChange)="configChange($event)"
[refresh]="refresh"
[showChildDevices]="showChildDevices"
(onChildDevices)="withChildren = $event; onChildDevices.emit($event)"
>
<div class="c8y-empty-state">
<h1 c8yIcon="search"></h1>
<div>
<p>
<strong>{{ 'No matching devices.' | translate }}</strong>
</p>
<small>{{ 'Refine your search terms' | translate }}</small>
</div>
</div>
<ng-container *ngFor="let column of columns; trackBy: trackByName">
<c8y-column [name]="column.name"></c8y-column>
</ng-container>
</c8y-data-grid>