All components

Data Table

Explore work items using the shared toolbar.

Examples

Explore work items using the shared toolbar

React code
import { ManagedDataTable } from "@accelerate/react/components";
import "@accelerate/ui/data-table.css";

const columns = ["Item", "Owner", "Status"];
const rows = [
  ["Review inbound schedule", "Maya", "In progress"],
  ["Confirm capacity", "Jules", "Open"],
  ["Reconcile exceptions", "Morgan", "Open"],
];

export function Example() {
  return <ManagedDataTable caption="Work items" columns={columns} rows={rows} />;
}
Angular code
import { Component } from "@angular/core";
import { AccDataTable } from "@accelerate/angular/components";

@Component({
  selector: "app-example",
  imports: [AccDataTable],
  template: `
    <acc-data-table caption="Work items" [columns]="columns" [rows]="rows" />
  `,
})
export class Example {
  columns = ["Item", "Owner", "Status"];
  rows = [
    ["Review inbound schedule", "Maya", "In progress"],
    ["Confirm capacity", "Jules", "Open"],
    ["Reconcile exceptions", "Morgan", "Open"],
  ];
}

Installation

Source preview. The expanded component catalog is ahead of the public npm releases. To run these examples in your own application, use packages built from the SDK source used for the previews or a release that includes the APIs below.

React
@accelerate/ui@0.4.0 and @accelerate/react@0.4.0
Angular
@accelerate/ui@0.4.0 and @accelerate/angular@0.2.0

Load @accelerate/ui/theme.css and put acc-theme on the app or the region using Accelerator components. Import @accelerate/ui/data-table.css for the shared table controls. See the framework setup guide for the theme and adapter conventions.

Usage

Angular imports AccDataTable. Pass the caption, columns and rows for the shared toolbar with sorting, grouping, filtering, row coloring, and column visibility. React's existing DataTable continues to support authored table markup.

Import the React component ManagedDataTable from @accelerate/react/components. For Angular, add AccDataTable to the standalone component’s imports and use <acc-data-table>.

Examples use these React parts: ManagedDataTable. The Angular examples show the corresponding directives and template hosts.

API reference

caption
Required name for the table and its settings.
columns / rows
Supply column labels and matching cell arrays.
hideCaption
Hides the visible caption while keeping an accessible label.
Toolbar
Filter, group, sort, color rows, or choose visible columns.