Resource List

Columns
Order Date Customer Total
#1001 Oct 24 Ana Anić €42.00
#1002 Oct 23 Bojan Bojić €18.50
#1003 Oct 22 Cvijeta Cvijić €120.00
Attribute Type Documentation Default Value
Required id * :string
list :string

key of the list: scopes the column choice and the search event

labels :map

text overriding the English defaults (see moduledoc)

%{}
event_prefix :string "list:"
confirm_attr :string

attribute a confirm text is written into; the host's confirmation dialog reads it

"data-confirm"
Required rows * :any

a list or a LiveStream

row_id :any
row_item :any
row_class :any
empty? :boolean

whether there are no rows; a stream cannot tell

loading? :boolean false
body_rest :map

attributes of the rows' <tbody>, e.g. the host's hook

%{}
views :list

%{key, label, patch, count?}

[]
active_view :string
view_delete :map

%{id, label, confirm} of the open saved view

save_view :atom
search :map

%{name, value}; nil draws no toolbar form

search_placeholder :string
chips :list

%{key, label, type, value, options?}; type is :select, :date or :amount

[]
addable :list

%{key, label} the Filter menu offers

[]
filtered? :boolean false
columns :list

%{key, label} of the columns that can be hidden

[]
sort :map

%{key, dir}, dir is "asc" or "desc"

sort_patch :any

fn key, dir -> path end

selection :map

`%{selected: MapSet, ids: [id], toggle: event, toggle_all: event,

Read more Read less

row_id: fn row -> id end, row_label: fn row -> name end}. idsare the rows on this page ("select all");selected` may be wider.

bulk_primary :integer 3
stat :slot
Show slot attributes Hide slot attributes
Required label * :string
Required value * :any
actions :slot
Required col * :slot
Show slot attributes Hide slot attributes
Required label * :string
align :string
key :string

column key for the column picker; a column without one always shows

sort :string

sort key; makes the header a sorting link

sort_first :string

direction of the first click, "asc" (default) or "desc"

<:col :let={order} label="Order"><a href="#" data-row-link>#{order.id}</a></:col>
<:col :let={order} label="Date" sort="date" sort_first="desc">{order.date}</:col>
<:col :let={order} label="Customer" key="customer" sort="customer">{order.customer}</:col>
<:col :let={order} label="Total" key="total" align="right">{order.total}</:col>
bulk_action :slot
Show slot attributes Hide slot attributes
Required click * :any
id :string
icon :string
variant :string
confirm :string
disabled :boolean
expanded :boolean

the action opens a panel: aria-expanded

controls :string

id of the panel it opens: aria-controls

bulk_more :slot
Show slot attributes Hide slot attributes
Required click * :any
id :string
icon :string
variant :string
confirm :string
disabled :boolean
expanded :boolean

the action opens a panel: aria-expanded

controls :string

id of the panel it opens: aria-controls

bulk_panel :slot

a form for the selected rows (bulk edit), drawn right under the bulk bar while rows are selected

grid :slot

replaces the table; the bulk bar stands above it

empty :slot
footer :slot