function createTableHook<TFeatures>(__namedParameters): object;Defined in: packages/ember-table/declarations/create-table-hook.d.ts:28
Bundles a feature set and shared default options once so every table in your app can be created without repeating them. Returns a typed column helper factory and a createAppTable that wraps useTable.
Unlike the React adapter's hook, this does not pre-bind cell/header components onto the table; render with the FlexRenderCell, FlexRenderHeader, and FlexRenderFooter components as usual.
TFeatures extends TableFeatures
CreateTableHookOptions<TFeatures>
object
appFeatures: TFeatures;createAppColumnHelper: <TData>() => ColumnHelper<TFeatures, TData>;TData extends RowData
ColumnHelper<TFeatures, TData>
createAppTable: {
<TData> (owner, getTableOptions): AppEmberTable<TFeatures, TData>;
<TData> (getTableOptions): AppEmberTable<TFeatures, TData>;
};<TData>(owner, getTableOptions): AppEmberTable<TFeatures, TData>;TData extends RowData
object
() => Omit<TableOptions<TFeatures, TData>, "features">
AppEmberTable<TFeatures, TData>
<TData>(getTableOptions): AppEmberTable<TFeatures, TData>;TData extends RowData
() => Omit<TableOptions<TFeatures, TData>, "features">
AppEmberTable<TFeatures, TData>
const { createAppTable, createAppColumnHelper } = createTableHook({
features: tableFeatures({ rowSortingFeature, sortedRowModel: createSortedRowModel(), sortFns }),
})
const columnHelper = createAppColumnHelper<Person>()
const columns = columnHelper.columns([...])
// inside a Glimmer component; passing `this` binds cleanup to its lifecycle
table = createAppTable(this, () => ({ columns, data: this.data }))