Skip to content

0.22.0

Choose a tag to compare

@woylie woylie released this 26 Sep 01:00
· 505 commits to main since this release
1e2e576

Added

  • Added directions attribute to the col slot of the table component. This
    allows you to override the default sort directions, e.g. to specify
    nulls-first or nulls-last.
  • Added thead_th_attrs and th_wrapper_attrs attributes to the col slot
    of the table component.
  • Added thead_th_attrs attribute to the action slot of the table component.

Changed

  • Renamed attrs mattribute on the col and action slots of the table
    component to tbody_td_attrs in order to match the naming of the global
    table options.

Upgrade guide

Rename the attrs attribute to tbody_td_attrs in both the col slot and the
action slot:

<Flop.Phoenix.table items={@pets} meta={@meta} path={~p"/pets"}>
-  <:col :let={p} attrs={[class="my-class"]}><%= p.id %></:col>
-  <:action :let={p} attrs={[class="my-class"]}>button</:col>
+  <:col :let={p} tbody_td_attrs={[class="my-class"]}><%= p.id %></:col>
+  <:action :let={p} tbody_td_attrs={[class="my-class"]}>button</:col>
</Flop.Phoenix.table>