File

search/search-grid.component.ts

Implements

GridConfigContextProvider

Metadata

Index

Properties
Methods
Inputs
Outputs
Accessors

Constructor

constructor(assetSearchService: AssetSearchService, bsModalService: BsModalService, smartGroupsService: SmartGroupsService, subAssetsGridService: SubAssetsService)
Parameters :
Name Type Optional
assetSearchService AssetSearchService No
bsModalService BsModalService No
smartGroupsService SmartGroupsService No
subAssetsGridService SubAssetsService No

Inputs

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 : ''

Outputs

onColumnsChange
Type : EventEmitter<Column[]>

Methods

getGridConfigContext
getGridConfigContext()
ngAfterViewInit
ngAfterViewInit()
Returns : void
ngOnInit
ngOnInit()
Returns : void
onColumnFilterReset
onColumnFilterReset(column: Column)
Parameters :
Name Type Optional
column Column No
Returns : void
Async onDataSourceModifier
onDataSourceModifier(dataSourceModifier: DataSourceModifier)
Parameters :
Name Type Optional
dataSourceModifier DataSourceModifier No
setActionControls
setActionControls()
Returns : void
trackByName
trackByName(_index, column: Column)
Parameters :
Name Type Optional
_index No
column Column No
Returns : string
updateFiltering
updateFiltering(columnNames: string[], action: literal type)
Parameters :
Name Type Optional
columnNames string[] No
action literal type No
Returns : void

Properties

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

Accessors

_columns
set_columns(value: Column[])
Parameters :
Name Type Optional
value Column[] No
Returns : void
_pagination
set_pagination(value: Pagination)
Parameters :
Name Type Optional
value Pagination No
Returns : void
_actionControls
set_actionControls(value: ActionControl[])
Parameters :
Name Type Optional
value ActionControl[] No
Returns : void
_bulkActionControls
set_bulkActionControls(value: BulkActionControl[])
Parameters :
Name Type Optional
value BulkActionControl[] No
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>

results matching ""

    No results matching ""