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.
:table_class- The CSS class for the
<table>element. No default.
:symbol_class- The CSS class for the
<span>element that wraps the order direction indicator in the header columns. Defaults to
:symbol_asc- The symbol that is used to indicate that the column is sorted in ascending order. Defaults to
:symbol_desc- The symbol that is used to indicate that the column is sorted in ascending order. Defaults to
:container- Wraps the table in a
true. Defaults to
:container_class- The CSS class for the table container. Defaults to
See the module documentation for examples.