mirror of
https://github.com/TanStack/table.git
synced 2026-11-18 18:55:54 +00:00
* fix: simplify some column pinning + visibility memo deps and performance * fix pnpm link issue with match-sorter-utils
1.6 KiB
1.6 KiB
| id | title |
|---|---|
| TanStackTable | TanStackTable |
Class: TanStackTable<TFeatures, TData>
Defined in: packages/angular-table/src/helpers/table.ts:59
Provides a TanStack Table instance (AngularTable) in Angular DI.
The table can be injected by:
- any descendant of an element using
[tanStackTable]="..." - any component instantiated by
*flexRenderwhen the render props containstable
Example
<div [tanStackTable]="table">
<app-pagination />
</div>
@Component({
selector: 'app-pagination',
template: `
<button (click)="prev()" [disabled]="!table().getCanPreviousPage()">Prev</button>
<button (click)="next()" [disabled]="!table().getCanNextPage()">Next</button>
`,
})
export class PaginationComponent {
readonly table = injectTableContext()
prev() {
this.table().previousPage()
}
next() {
this.table().nextPage()
}
}
Type Parameters
TFeatures
TFeatures extends TableFeatures
TData
TData extends RowData
Constructors
Constructor
new TanStackTable<TFeatures, TData>(): TanStackTable<TFeatures, TData>;
Returns
TanStackTable<TFeatures, TData>
Properties
table
readonly table: InputSignal<AngularTable<TFeatures, TData>>;
Defined in: packages/angular-table/src/helpers/table.ts:68
The current TanStack Table instance.
Provided as a required signal input so DI consumers always read the latest value.