UNPKG

@fleetbase/ember-ui

Version:

Fleetbase UI provides all the interface components, helpers, services and utilities for building a Fleetbase extension into the Console.

21 lines (16 loc) 508 B
import Service from '@ember/service'; import { tracked } from '@glimmer/tracking'; import { action } from '@ember/object'; export default class TableContextService extends Service { @tracked node; @tracked table; @action getSelectedIds() { return this.table?.selectedRows?.map((row) => row.id) ?? []; } @action getSelectedRows() { return this.table?.selectedRows ?? []; } @action untoggleSelectAll() { return this.table?.untoggleSelectAll?.(); } }