PhoenixBetterTable (phoenix_better_table v0.1.0)
A table component whose contents can be sorted by clicking on each header.
Assigns
:meta
- a map containing a:headers
key:headers:
- a list of maps, each representing a header in the table::id
- the column's id, which will be used as the key for rendering and sorting:label
- the column's label (optional):sort
- a boolean indicating whether the column is sortable (optional, default true)
:rows
- a list of maps, each representing a row in the table:sort
- a tuple containing the column id and the sort order (:asc
or:desc
) (optional):class
- a string containing additional classes to be added to the table (optional)
Summary
Functions
Callback implementation for Phoenix.LiveComponent.render/1
.
Functions
Link to this function
render(assigns)
Callback implementation for Phoenix.LiveComponent.render/1
.