Table component for displaying data in a traditional HTML table layout.
DEPRECATED: Use Cinder.collection instead. This module will be removed in version 1.0.
<!-- Use this instead -->
<Cinder.collection resource={MyApp.User} actor={@current_user}>
<:col :let={user} field="name" filter sort>{user.name}</:col>
</Cinder.collection>See the Upgrading Guide for migration instructions.
Basic Usage
<Cinder.Table.table resource={MyApp.User} actor={@current_user}>
<:col :let={user} field="name" filter sort>{user.name}</:col>
<:col :let={user} field="email" filter>{user.email}</:col>
<:col :let={user} field="created_at" sort>{user.created_at}</:col>
</Cinder.Table.table>With Query
<Cinder.Table.table query={MyApp.User |> Ash.Query.filter(active: true)} actor={@current_user}>
<:col :let={user} field="name" filter sort>{user.name}</:col>
<:col :let={user} field="email" filter>{user.email}</:col>
</Cinder.Table.table>See Also
Cinder.collection/1- Unified collection component supporting table, list, and grid layoutsCinder.Collection- Full documentation for all collection features
Summary
Functions
Builds the list of columns used for query operations (filtering AND searching).
Delegates to Cinder.Collection.build_query_columns/2.
Process column definitions into the format expected by the underlying component.
Delegates to Cinder.Collection.process_columns/2.
Process filter-only slot definitions.
Delegates to Cinder.Collection.process_filter_slots/2.
Process unified search configuration into individual components.
Delegates to Cinder.Collection.process_search_config/2.
Renders a data table.
Functions
Builds the list of columns used for query operations (filtering AND searching).
Delegates to Cinder.Collection.build_query_columns/2.
Process column definitions into the format expected by the underlying component.
Delegates to Cinder.Collection.process_columns/2.
Process filter-only slot definitions.
Delegates to Cinder.Collection.process_filter_slots/2.
Process unified search configuration into individual components.
Delegates to Cinder.Collection.process_search_config/2.
Renders a data table.
DEPRECATED: Use Cinder.collection instead.
This is equivalent to calling Cinder.collection with layout={:table}.
Attributes
resource(:atom) - The Ash resource to query. Defaults tonil.query(:any) - The Ash query to execute. Defaults tonil.actor(:any) - Actor for authorization. Defaults tonil.tenant(:any) - Tenant for multi-tenant resources. Defaults tonil.scope(:any) - Ash scope containing actor and tenant. Defaults tonil.id(:string) - Unique identifier for the table. Defaults to"cinder-table".page_size(:any) - Number of items per page. Defaults to25.theme(:any) - Theme name or theme map. Defaults to"default".url_state(:any) - URL state object from UrlSync.handle_params. Defaults tofalse.query_opts(:list) - Additional Ash query options. Defaults to[].on_state_change(:any) - Custom state change handler. Defaults tonil.show_pagination(:boolean) - Whether to show pagination controls. Defaults totrue.show_filters(:boolean) - Whether to show filter controls. Defaults tonil.loading_message(:string) - Message to show while loading. Defaults to"Loading...".filters_label(:string) - Label for the filters component. Defaults to"Filters".search(:any) - Search configuration. Defaults tonil.empty_message(:string) - Message when no results. Defaults to"No results found".error_message(:string) - Message to show on error. Defaults tonil.class(:string) - Additional CSS classes. Defaults to"".row_click(:any) - Function to call when a row is clicked. Defaults tonil.
Slots
col- Accepts attributes:field(:string)filter(:any)filter_options(:list)sort(:any)search(:boolean)label(:string)class(:string)
filter- Accepts attributes:field(:string)filter(:any)label(:string)
loading- Custom loading state content.empty- Custom empty state content.error- Custom error state content.