AdaptTable for Angular Aria

Saved views in Angular Aria

A view is the table's state — search, sort, filters and the column layout — saved under a name.

Save one from the views menu and pick it again later to put the table back the way it was. The list lives in this browser's storage, or in any store you hand savedViews.

The code

import { Component, input } from "@angular/core";
import type { ColumnDef } from "@adapttable/angular";
import { AdaptDataTable } from "@adapttable/angular-aria";
import { filters } from "@adapttable/angular-aria/filters";
import { savedViews } from "@adapttable/angular-aria/saved-views";

const columns: ColumnDef<Person>[] = [
  { key: "name", sortable: true },
  { key: "team" },
  { key: "budget", sortable: true },
];

@Component({
  selector: "app-people",
  imports: [AdaptDataTable],
  template: `
    <adapt-data-table
      [data]="rows()"
      [columns]="columns"
      [rowKey]="rowKey"
      urlKey="people"
      [features]="features"
    />
  `,
})
export class People {
  readonly rows = input.required<readonly Person[]>();
  readonly columns = columns;
  readonly rowKey = (row: Person) => row.id;
  readonly features = [
    filters([]),
    savedViews({ storageKey: "people-views", urlKey: "people" }),
  ];
}

Install

# Follow the kit setup guide for compatible peers
pnpm add @adapttable/angular-aria @adapttable/angular @angular/aria@22.2.1 @angular/cdk@22.2.1 @angular/forms@^22 rxjs@^7.8.2

The same feature in the other kits

More Angular Aria features

Reference: saved-views, url-state. More of this kit: AdaptTable for Angular Aria, or the live demo.