SurfaceBulma.Table (surface_bulma v0.3.3)

A Bulma HTML table.

You can create a table by passing data to it and defining columns using the Table.Column component.

Look in the documentation for Table.Column for information on how to do sorting.

Properties

  • id :string, required: true - The id of the live component (required by LiveView for stateful components).

  • data :list, required: true - The data that populates the table internal

  • expanded :boolean, default: true - The table is expanded (full-width)

  • bordered :boolean, default: false - Add borders to all the cells

  • striped :boolean, default: false - Add stripes to the table

  • class :css_class - The CSS class for the wrapping <div> element

  • row_class :fun - A function that returns a class for the item's underlying <tr> element. The function receives the item and index related to the row.

Slots

  • cols, args: [item: ^data], required: true - The columns of the table

Link to this section Summary

Link to this section Functions

Link to this function

handle_event(binary, map, socket)

Callback implementation for Phoenix.LiveComponent.handle_event/3.

Callback implementation for Phoenix.LiveComponent.mount/1.

Link to this function

render(assigns)

Callback implementation for Phoenix.LiveComponent.render/1.

Link to this function

update(assigns, socket)

Callback implementation for Phoenix.LiveComponent.update/2.