You're seeing just the function
table, go back to Flop.Phoenix module for more information.
Generates a table with sortable columns.
The argument is a map with the following keys:
headers: A list of header columns. Can be a list of strings (or markup), or a list of
items: The list of items to be displayed in rows. This is the result list returned by the query.
Flop.Metastruct returned by the query function.
path_helper: The Phoenix path or url helper that leads to the current page.
path_helper_args: The argument list for the path helper. For example, if you would call
Routes.pet_path(@conn, :index)to generate the path for the current page, this would be
opts: Keyword list with additional options (see below). This list will also be passed as the second argument to the row function.
row_func: A function that takes one item of the
itemslist and the
optsand returns the column values for that item's row.
:for- The schema module deriving
Flop.Schema. If set, header links are only added for fields that are defined as sortable. Default:
:table_attrs- The attributes for the
:th_wrapper_attrs- The attributes for the
<span>element that wraps the header link and the order direction symbol. Default:
:symbol_attrs- The attributes for the
<span>element that wraps the order direction indicator in the header columns. Default:
:symbol_asc- The symbol that is used to indicate that the column is sorted in ascending order. Default:
:symbol_desc- The symbol that is used to indicate that the column is sorted in ascending order. Default:
:container- Wraps the table in a
:container_attrs- The attributes for the table container. Default:
:no_results_content- Any content that should be rendered if there are no results. Default:
:thead_tr_attrs: Attributes to added to each
<tr>tag within the
:thead_th_attrs: Attributes to added to each
<th>tag within the
:tbody_tr_attrs: Attributes to added to each
<tr>tag within the
:tbody_td_attrs: Attributes to added to each
<td>tag within the
See the module documentation for examples.