device-grid/device-grid.model.ts

Deprecated

Use `ActionControlHook` instead.

Description

Defines an action hook for the device grid.

DeviceGridActionHook {BuiltInActionType} type of the action {boolean} refreshAfterActionDone refreshs the device grid after the action execution {(mo: IManagedObject) => boolean} deviceMatches resolves the object of the row and needs to return true for an element that you want to execute your action on

Example :
 {
    ...
    deviceMatches: (device: IManagedObject) => device?.type === 'my_custom_type'
 }

{(mo: IManagedObject) => Observable | Promise | unknown} onAction is called for a matching device. It resolves the object of the row.

Example :
 {
    ...
    onAction: (device: IManagedObject) => this.myService.triggerCustomAction(device)
 }

results matching ""

    No results matching ""