Angular table features and presets
Features are ordinary AdaptTableFeature objects composed by the table.
A kit factory adds that kit’s controls to the binding’s behavior. Import the
factory from the same kit as AdaptDataTable.
Compose individual entries
Section titled “Compose individual entries”import { Component } from "@angular/core";import type { ColumnDef } from "@adapttable/angular";import { AdaptDataTable } from "@adapttable/ng-zorro";import { columnMenu } from "@adapttable/ng-zorro/column-menu";import { findInTable } from "@adapttable/ng-zorro/find-in-table";import { multiSort } from "@adapttable/ng-zorro/multi-sort";
interface Person { id: string; name: string;}
@Component({ selector: "people-table", standalone: true, imports: [AdaptDataTable], template: ` <adapt-data-table [data]="people" [columns]="columns" [rowKey]="rowKey" [features]="features" tableLabel="People" /> `,})export class PeopleTable { readonly people: Person[] = [{ id: "ada", name: "Ada Lovelace" }]; readonly columns: ColumnDef<Person>[] = [{ key: "name", sortable: true }]; readonly rowKey = (row: Person) => row.id; readonly features = [ columnMenu(), multiSort(), findInTable({ button: true }), ];}The native kit exposes the same paths below
@adapttable/angular-unstyled. NG-ZORRO requires its host theme and peer
dependencies; see Getting started.
Keep feature objects stable while their configuration is unchanged, instead of calling factories on every template evaluation. Bind a new feature list when the host changes configuration: the shell updates its options and slots, cleans up replaced or removed behavior, and preserves the table’s data and unchanged feature state. Controlled inputs can also follow host signals without replacing their feature.
The standard preset
Section titled “The standard preset”import { standardFeatures } from "@adapttable/angular-unstyled/preset";
const features = standardFeatures();The zero-argument preset contains exactly:
columnMenu(),resizableColumns()andfitColumns()— the column-layout familydensityChooser()exportCsv()findInTable()— keyboard Find;findButton: trueadds its toolbar controlfullscreen()multiSort()statusBar()headerFilters()
Its optional grouping, bulkActions, filters and savedViews options add
the corresponding configured factories; filters brings the filtering
family. For example, standardFeatures({ grouping: "department" }) adds
grouping by that column. The preset returns an ordinary array, so append
other features as needed.
Families
Section titled “Families”A family is every member of an area built by one call and passed to
features as one entry: editingFamily(save) from /editing (cell editing,
dirty marks, edit history and undo controls), filteringFamily(defs) from
/filtering (the filter panel and header filters) and columnLayoutFamily()
from /column-layout (columns menu, resizing and fitting). Each family has
its own entry, so a member imported alone still loads alone.
import { columnLayoutFamily } from "@adapttable/angular-unstyled/column-layout";import { editingFamily } from "@adapttable/angular-unstyled/editing";
interface Person { id: string; name: string;}declare function save(row: Person, key: string, value: unknown): Promise<void>;
const features = [editingFamily<Person>(save), columnLayoutFamily()];/features gathers the kit’s factory exports. Individual subpaths give you
a smaller dependency graph and make feature cost easier to inspect. A preset
imports its members; configuring behavior is not a promise that all unused
members disappear from a bundle.
Configure a scope through dependency injection
Section titled “Configure a scope through dependency injection”provideAdaptTableFeatures(...features) from @adapttable/angular returns
environment providers for bootstrapApplication or route providers. Features
from the injector precede a table’s own [features]. A duplicate feature id
resolves to the last declaration for configuration, registrations and slot
rendering, so a local entry can replace an inherited one.
Keep kit choice consistent in that scope: providing NG-ZORRO features to a native table would mix two control libraries.
Where each optional import lives
Section titled “Where each optional import lives”- Filters:
/filters,/header-filters,/saved-views - Columns:
/column-menu,/column-groups,/resizable-columns,/fit-columns,/multi-sort,/column-selection - Rows:
/row-actions,/bulk-actions,/row-detail,/nested-table,/row-reorder,/row-pinning,/pinned-summary-rows,/tree - Editing:
/editing, withbatchEditingon/batch-editing - Keyboard and tools:
/cell-navigation,/selection-stats,/find-in-table,/command-palette,/context-menu - Analytics and layout:
/grouping,/grouping-panel,/pivot,/virtualize,/side-panel,/status-bar,/density,/fullscreen - Export:
/exportand/print
Formula columns, sparklines, stream helpers and the Router adapter are binding
entries: @adapttable/angular/formula, /sparkline, /stream and /router.
There is no kit /formula or /sparkline entry. Assistant state lives in
@adapttable/ai-angular; assistant controls are a kit /assistant feature.
Authoring a feature
Section titled “Authoring a feature”AdaptTableFeature supports apply for merged configuration, setup for
registrations, renders for named slots and mount for live runtime behavior.
extendFeature adds kit slot fills while retaining the base feature;
slotRender names each fill. Slot components receive one props input.
A mounted feature receives the table runtime, injector and per-table feature state. Return a cleanup for subscriptions or resources. The shell disposes replaced or removed behavior and cleans up the remaining features when the table is destroyed. Unchanged mounted features retain their runtime and state; a custom adapter must reconcile this lifecycle rather than mounting every feature again during each render.
See Building an adapter, Headless rendering, and the shared architecture concepts.