Tpk Table Generic Prefab

A generic table component with sorting, pagination, filtering, and customizable columns.

Examples

Basic usage

Nom Prénom Email
Giga Chad
Marc Jean
Lepond Louis
Dragon Lucas
Leroy Simon
1 - 5 on 5 results

Properties

Name Type Required Description
tableParams TableParams Yes Configuration object defining the table entity, columns, pagination, sorting, and actions.
columnsComponent Record<string, Invokable<any>> No Map of component names to Glimmer components used for custom column cell rendering.
entity string Yes API endpoint path used to fetch table data (e.g. "/users").
pageSizes number[] No Available page size options shown in the pagination footer. Defaults to [5, 10, 25].
defaultSortColumn string No Column field to sort by on initial load.
additionalFilters Record<string, string> No Static key-value pairs appended to every API request as query parameters.
relationships string No Comma-separated relationship names to include in API requests.
rowClick (element?: unknown, e?: Event) => void No Callback fired when a table row is clicked. Receives the row data and DOM event.
columns Column[] Yes Array of column definitions with field path, header label, sortable flag, and optional component name.
actionMenu ActionMenuItem[] No Array of action menu items, each with a name, optional icon component, and action callback.