@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
JavaScript
import Service from '@ember/service';
import { tracked } from '@glimmer/tracking';
import { action } from '@ember/object';
export default class TableContextService extends Service {
node;
table;
getSelectedIds() {
return this.table?.selectedRows?.map((row) => row.id) ?? [];
}
getSelectedRows() {
return this.table?.selectedRows ?? [];
}
untoggleSelectAll() {
return this.table?.untoggleSelectAll?.();
}
}