Defined in: TableController.ts:139
A Lit ReactiveController for TanStack Table integration.
Uses constructReactivityFeature from table-core to properly integrate with the TanStack Store reactivity system, matching the pattern used by all other framework adapters (React, Vue, Solid, Svelte, Angular).
@customElement('my-table')
class MyTable extends LitElement {
private tableController = new TableController<typeof features, Person>(this)
protected render() {
const table = this.tableController.table(
{
features,
rowModels: {},
columns,
data,
},
(state) => ({ sorting: state.sorting }),
)
// use table in your template...
}
}@customElement('my-table')
class MyTable extends LitElement {
private tableController = new TableController<typeof features, Person>(this)
protected render() {
const table = this.tableController.table(
{
features,
rowModels: {},
columns,
data,
},
(state) => ({ sorting: state.sorting }),
)
// use table in your template...
}
}TFeatures extends TableFeatures
TData extends RowData
new TableController<TFeatures, TData>(host): TableController<TFeatures, TData>;new TableController<TFeatures, TData>(host): TableController<TFeatures, TData>;Defined in: TableController.ts:150
ReactiveControllerHost
TableController<TFeatures, TData>
host: ReactiveControllerHost;host: ReactiveControllerHost;Defined in: TableController.ts:143
hostConnected(): void;hostConnected(): void;Defined in: TableController.ts:251
Called when the host is connected to the component tree. For custom element hosts, this corresponds to the connectedCallback() lifecycle, which is only called when the component is connected to the document.
void
ReactiveController.hostConnectedReactiveController.hostConnectedhostDisconnected(): void;hostDisconnected(): void;Defined in: TableController.ts:255
Called when the host is disconnected from the component tree. For custom element hosts, this corresponds to the disconnectedCallback() lifecycle, which is called the host or an ancestor component is disconnected from the document.
void
ReactiveController.hostDisconnectedReactiveController.hostDisconnectedtable<TSelected>(tableOptions, selector?): LitTable<TFeatures, TData, TSelected>;table<TSelected>(tableOptions, selector?): LitTable<TFeatures, TData, TSelected>;Defined in: TableController.ts:170
Returns the Lit-backed table instance for the current render pass.
The first call constructs the table with Lit reactivity bindings and subscribes the host to table state/options changes. Later calls merge new options into the same table instance and expose selected state through table.state.
TSelected = TableState<TFeatures>
TableOptions<TFeatures, TData>
(state) => TSelected
LitTable<TFeatures, TData, TSelected>
const table = this.tableController.table(
{ features, rowModels: {}, columns, data },
(state) => ({ sorting: state.sorting }),
)const table = this.tableController.table(
{ features, rowModels: {}, columns, data },
(state) => ({ sorting: state.sorting }),
)