AdaptTable for Angular CDK

Right-to-left Angular CDK data table

Arabic labels and cell values mirror the table, its pager and the filter popover. Pinning uses logical edges, so start is the right edge.

Pass getLabels("ar") to labels and getDirection("ar") to dir. Every table, including nested tables, receives the same presentation settings.

Append ?locale=ar&dir=rtl to any Angular feature page to exercise its real table in Arabic and right-to-left layout.

The code

import { Component, input } from "@angular/core";
import type { ColumnDef } from "@adapttable/angular";
import { getDirection, getLabels } from "@adapttable/i18n";
import { AdaptDataTable } from "@adapttable/angular-cdk";
import { filters } from "@adapttable/angular-cdk/filters";

@Component({
  selector: "app-arabic-people",
  imports: [AdaptDataTable],
  template: `
    <adapt-data-table
      [data]="rows()" [columns]="columns()" [rowKey]="rowKey"
      [dir]="dir" [labels]="labels" [features]="features"
      filtersMode="popover"
    />
  `,
})
export class ArabicPeople {
  readonly rows = input.required<readonly Person[]>();
  readonly columns = input.required<readonly ColumnDef<Person>[]>();
  readonly rowKey = (row: Person) => row.id;
  readonly dir = getDirection("ar");
  readonly labels = getLabels("ar");
  readonly features = [filters([{ key: "name", type: "text", label: "الاسم" }])];
}

Install

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

The same feature in the other kits

More Angular CDK features

Reference: i18n-rtl. More of this kit: AdaptTable for Angular CDK, or the live demo.