File

device-grid-example/device-grid-example.component.ts

Metadata

Index

Properties
Methods

Constructor

constructor(deviceGridService: DeviceGridService)
Parameters :
Name Type Optional
deviceGridService DeviceGridService No

Methods

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 :
Name Optional
example No
Returns : void
setColumnsOutput
setColumnsOutput(output: DeviceGridColumn[])
Parameters :
Name Type Optional
output DeviceGridColumn[] No
Returns : void

Properties

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>

results matching ""

    No results matching ""