Tables, lists and grids of Ash resources in Phoenix LiveView, with filtering, sorting, search and pagination.
<Cinder.collection 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>
</Cinder.collection>For a list or grid, describe each item with an <:item> slot:
<Cinder.collection resource={MyApp.User} actor={@current_user} layout={:grid}>
<:col field="name" filter sort />
<:item :let={user}>
<div class="p-4 border rounded">{user.name}</div>
</:item>
</Cinder.collection>This module holds the component, collection/1 (see Cinder.Collection for its attributes),
and functions for changing a collection from your LiveView:
refresh_table/2,3andrefresh_tables/2,3re-read collections.update_item/4,update_items/4,update_if_visible/4andupdate_items_if_visible/4change rows on screen without re-reading.remove_item/3andremove_items/3take rows off the page.
See the Getting Started guide to begin, and Custom Filters to write your own filter types.