View Source Phoenix.WebComponent.Table (Phoenix.WebComponent v1.6.3)

Render a data table.

The table is bx-table custom element.

Link to this section Summary

Functions

Generates a html customElement bx-data-table.

Link to this section Functions

Generates a html customElement bx-data-table.

Docs of bx-data-table (See https://web-components.carbondesignsystem.com/?path=/story/components-data-table--default).

examples

Examples

wc_table([%{name: "Jonathan"}], [columns: [name: "Name"]])
#=> <bx-data-table>
#=> <bx-table>
#=> <bx-table-head>
#=> <bx-table-header-row>
#=> <bx-table-header-cell>Name</bx-table-header-cell>
#=> </bx-table-header-row>
#=> </bx-table-head>
#=> <bx-table-body>
#=> <bx-table-row>
#=> <bx-table-cell>Jonathan</bx-table-cell>
#=> </bx-table-row>
#=> </bx-table-body>
#=> </bx-table>
#=> </bx-data-table>

options

Options

  • :columns - print log in browser console

  • :content_columns - columns that have special renderer.

  • :content_functions - renderer defined in :content_columns

  • :toolbar_actions - Action buttons at top right.

All other options are forwarded to the underlying button input.