search/search-grid.component.ts
providers |
{
provide: DATA_GRID_CONFIGURATION_STRATEGY, useClass: UserPreferencesConfigurationStrategy
}
{
provide: DATA_GRID_CONFIGURATION_CONTEXT_PROVIDER, useExisting: SearchGridComponent
}
|
selector | c8y-search-grid |
templateUrl | ./search-grid.component.html |
Properties |
Methods |
Inputs |
Outputs |
Accessors |
constructor(assetSearchService: AssetSearchService, bsModalService: BsModalService, smartGroupsService: SmartGroupsService, subAssetsGridService: SubAssetsService)
|
|||||||||||||||
Parameters :
|
actionControls |
Type : []
|
bulkActionControls |
Type : []
|
columns |
Type : []
|
columnsConfigKey |
Type : string
|
The name of the key where columns configuration will be stored. |
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<Column[]>
|
getGridConfigContext |
getGridConfigContext()
|
Returns :
UserPreferencesGridConfigContext
|
ngAfterViewInit |
ngAfterViewInit()
|
Returns :
void
|
ngOnInit |
ngOnInit()
|
Returns :
void
|
onColumnFilterReset | ||||||
onColumnFilterReset(column: Column)
|
||||||
Parameters :
Returns :
void
|
Async onDataSourceModifier | ||||||
onDataSourceModifier(dataSourceModifier: DataSourceModifier)
|
||||||
Parameters :
Returns :
Promise<ServerSideDataResult>
|
setActionControls |
setActionControls()
|
Returns :
void
|
trackByName | |||||||||
trackByName(_index, column: Column)
|
|||||||||
Parameters :
Returns :
string
|
updateFiltering | |||||||||
updateFiltering(columnNames: string[], action: literal type)
|
|||||||||
Parameters :
Returns :
void
|
actionControls |
Type : ActionControl[]
|
Public assetSearchService |
Type : AssetSearchService
|
bulkActionControls |
Type : BulkActionControl[]
|
Default value : this.assetSearchService.getDefaultBulkActionControls()
|
columns |
Type : Column[]
|
dataGrid |
Type : DataGridComponent
|
Decorators :
@ViewChild(DataGridComponent, {static: true})
|
pagination |
Type : Pagination
|
Default value : this.assetSearchService.getDefaultPagination()
|
refresh |
Type : EventEmitter<any>
|
Default value : new EventEmitter()
|
serverSideDataCallback |
Type : any
|
_columns | ||||||
set_columns(value: Column[])
|
||||||
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"
(onColumnFilterReset)="onColumnFilterReset($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>