@bimetal/table-angular-components
v0.35.0
Published
Angular table / data-grid — sortable columns, inline cell editing, selection, search, undo, theming.
Maintainers
Readme
@bimetal/table-angular-components
The default Angular table / data-grid for BIMETAL — a thin, standalone-component
binding over the canonical @bimetal/table-headless
controller. Behaviorally identical to the React and Vue tables: all interaction
logic lives in the controller, the component only renders the canonical
.bm-table* DOM, registers a window keydown listener, and normalizes keyboard
events.
Features
- Sortable columns — header click toggles none → asc → desc, with ARIA
aria-sortand sort affordances. - Inline cell editing — text, number and boolean (checkbox) editors; the controller owns commit/cancel and the keyboard semantics (Enter/Escape).
- Row selection, search, undo and theming (
darkMode).
Usage
import { Component } from '@angular/core';
import { Table } from '@bimetal/table-angular-components';
import { createTableStore } from '@bimetal/table-data';
import '@bimetal/table-angular-components/styles';
@Component({
standalone: true,
imports: [Table],
template: `<bm-table [store]="store" [config]="config" [darkMode]="true"></bm-table>`,
})
export class GridPage {
store = createTableStore();
config = {
columns: [
{ id: 'name', header: 'Name', type: 'text' },
{ id: 'qty', header: 'Qty', type: 'number' },
{ id: 'active', header: 'Active', type: 'boolean' },
],
};
}Inputs
| Input | Type | Default | Notes |
| ------------ | ------------------------ | ------- | ----------------------------------------------------------- |
| store | TableStore | — | Immutable after mount; remount (via @if/*ngIf) to swap. |
| config | TableConfigInput | — | Column schema + locale overrides; merged with defaults. |
| darkMode | boolean | false | Adds data-theme="dark". |
| title | string | — | Optional toolbar heading. Omitted → no heading rendered. |
| tag | string | — | Optional small toolbar tagline next to the heading. |
| showSearch | boolean | true | Toggles the toolbar search box. |
| onError | (err: unknown) => void | — | Non-domain error channel (e.g. ConcurrencyError). |
License
Apache-2.0 — see LICENSE.
