search/search-grid.component.ts
selector | c8y-search-grid |
templateUrl | ./search-grid.component.html |
Properties |
Methods |
Inputs |
Outputs |
Accessors |
constructor(coreSearchService: InventorySearchService, searchService: AssetSearchService, bsModalService: BsModalService, smartGroupsService: SmartGroupsService, subAssetsGridService: SubAssetsService)
|
||||||||||||||||||
Parameters :
|
actionControls |
Type : []
|
bulkActionControls |
Type : []
|
columns |
Type : []
|
filteringName |
Type : string
|
loadingItemsLabel |
Type : string
|
Default value : gettext('Loading results…')
|
pagination |
parent-group |
Type : IManagedObject
|
searchText |
Type : string
|
Default value : ''
|
selectable |
Type : boolean
|
Default value : false
|
title |
Type : string
|
Default value : ''
|
onColumnsChange |
Type : EventEmitter<DeviceGridColumn[]>
|
configChange | ||||
configChange(config)
|
||||
Parameters :
Returns :
void
|
ngOnInit |
ngOnInit()
|
Returns :
void
|
Async onDataSourceModifier | ||||||
onDataSourceModifier(dataSourceModifier: DataSourceModifier)
|
||||||
Parameters :
Returns :
Promise<ServerSideDataResult>
|
setActionControls |
setActionControls()
|
Returns :
void
|
trackByName | |||||||||
trackByName(_index, column: DeviceGridColumn)
|
|||||||||
Parameters :
Returns :
string
|
updateFiltering | |||||||||
updateFiltering(columnNames: string[], action: literal type)
|
|||||||||
Parameters :
Returns :
void
|
actionControls |
Type : ActionControl[]
|
bulkActionControls |
Type : BulkActionControl[]
|
Default value : this.searchService.getDefaultBulkActionControls()
|
columns |
Type : DeviceGridColumn[]
|
dataGrid |
Type : DataGridComponent
|
Decorators :
@ViewChild(DataGridComponent, {static: true})
|
pagination |
Type : Pagination
|
Default value : this.searchService.getDefaultPagination()
|
refresh |
Type : EventEmitter<any>
|
Default value : new EventEmitter()
|
Public searchService |
Type : AssetSearchService
|
serverSideDataCallback |
Type : any
|
_columns | ||||||
set_columns(value: DeviceGridColumn[])
|
||||||
Parameters :
Returns :
void
|
_pagination | ||||||
set_pagination(value: Pagination)
|
||||||
Parameters :
Returns :
void
|
_actionControls | ||||||
set_actionControls(value: ActionControl[])
|
||||||
Parameters :
Returns :
void
|
_bulkActionControls | ||||||
set_bulkActionControls(value: BulkActionControl[])
|
||||||
Parameters :
Returns :
void
|
<div class="card--grid--fullpage">
<c8y-data-grid
[title]="'Search results' | translate"
[loadingItemsLabel]="loadingItemsLabel"
[columns]="columns"
[pagination]="pagination"
[actionControls]="actionControls"
[selectable]="selectable"
[bulkActionControls]="bulkActionControls"
[serverSideDataCallback]="serverSideDataCallback"
[infiniteScroll]="'auto'"
[showSearch]="true"
[searchText]="searchText"
[refresh]="refresh"
(onConfigChange)="configChange($event)"
>
<ng-container *ngFor="let column of columns; trackBy: trackByName">
<c8y-column [name]="column.name"></c8y-column>
</ng-container>
<c8y-ui-empty-state
[icon]="'search'"
[title]="'No results to display.' | translate"
[subtitle]="'Refine your search terms or check your spelling.' | translate"
[horizontal]="true"
></c8y-ui-empty-state>
</c8y-data-grid>
</div>