device-grid-example/device-grid-example.component.ts
selector | c8y-device-grid-example |
templateUrl | ./device-grid-example.component.html |
Properties |
Methods |
constructor(deviceGridService: DeviceGridService)
|
||||||
Parameters :
|
getExampleWithCustomColumnAndPredefinedFiltering |
getExampleWithCustomColumnAndPredefinedFiltering()
|
Returns :
{ label: string; columns: any; }
|
getExampleWithStandardColumns |
getExampleWithStandardColumns()
|
Returns :
{ label: string; columns: any; }
|
getExampleWithStandardColumnsAndSavedFilteringSorting |
getExampleWithStandardColumnsAndSavedFilteringSorting()
|
Returns :
{ label: string; columns: any; }
|
onExampleSelect | ||||
onExampleSelect(example)
|
||||
Parameters :
Returns :
void
|
setColumnsOutput | ||||||
setColumnsOutput(output: DeviceGridColumn[])
|
||||||
Parameters :
Returns :
void
|
columnsInput |
Type : DeviceGridColumn[]
|
columnsOutput |
Type : DeviceGridColumn[]
|
deviceQueryStringOutput |
Type : string
|
examples |
Type : Array<literal type>
|
selectedExample |
<div class="content-fullpage">
<c8y-device-grid
[title]="'Select devices for bulk operation'"
[columns]="columnsInput"
[actionControls]="[]"
(onColumnsChange)="setColumnsOutput($event)"
(onDeviceQueryStringChange)="deviceQueryStringOutput = $event"
></c8y-device-grid>
</div>
<div class="row">
<div class="col-sm-6">
<div class="card ">
<div class="card-header separator">
<h4 class="card-title">Input</h4>
</div>
<div class="card-block">
<div class="c8y-select-wrapper">
<select
class="form-control"
[ngModel]="selectedExample"
(ngModelChange)="onExampleSelect($event)"
>
<option *ngFor="let example of examples" [ngValue]="example">{{
example.label
}}</option></select
><span></span>
</div>
<pre
>{{ columnsInput | json }}
</pre>
</div>
</div>
</div>
<div class="col-sm-6">
<div class="card">
<div class="card-header">
<span>
<h4 class="card-title">Output</h4>
</span>
</div>
<div class="card-block">
<pre
>{{ deviceQueryStringOutput | json }}
</pre>
<pre
>{{ columnsOutput | json }}
</pre>
</div>
</div>
</div>
</div>