LiveAntd.Components.Table (live_antd v0.1.0)

A table for normal way (it's not antd style.)

API

  • [x] title: table title
  • [x] withCard: with card compoenent.
  • [x] data: Data record array to be displayed
  • [x] rowClass: Row's className function(record, index) * [x]paginate: Table with data pagination
  • [x] onChange: Callback executed when pagination, filters or sorter is changed

Example

<Table data={{ item <- @table_list }}>

<Column label="Event ID">
  {{ item.event_id }}
</Column>
<Column label="Event Name">
  {{ item.event_name }}
</Column>
<Column label="Event Position">
  {{ item.event_position }}
</Column>
<Column label="Actions">
  <a href="#">{{ item.event_id }}</a>
</Column>

Properties

  • onChange :event
  • data :list, required: true
  • title :string
  • withCard :boolean, default: true
  • rowClass :fun
  • class :css_class
  • paginate :map, default: %{total_pages: 0, current_page: 0, per_page: 10, total_count: 0}

Link to this section Summary

Link to this section Functions

Callback implementation for Phoenix.LiveComponent.mount/1.

Link to this function

render(assigns)

Callback implementation for Phoenix.LiveComponent.render/1.

Link to this function

render_basic_table(assigns)

Link to this function

render_table(assigns)