{{#light-table table as |t|}}
  {{t.head}}
  {{t.body}}
  {{t.foot}}
{{/light-table}}

Please see the documentation for the Head, Body, and Foot components for more details on all possible options and actions.

Show:

breakpoints

Object

A hash to determine the number of columns to show per given breakpoint. If this is specified, it will override any column specific breakpoints.

If we have the following breakpoints defined in app/breakpoints.js:

  • mobile
  • tablet
  • desktop

The following hash can be passed in:

{
   mobile: 2,
   tablet: 4
  }
  

If there is no rule specified for a given breakpoint (i.e. desktop), all columns will be shown.


Default: null

estimatedRowHeight

Number

Estimated size of a row. Used in vertical-collection to determine roughly the number of rows exist out of the viewport.


Default: false

extra

Object

Object to store any arbitrary configuration meant to be used by custom components.

{{#light-table table
    extra=(hash
      highlightColor="yellow"
     )
     as |t|
   }}
    {{t.head}}
    {{t.body}}
    {{t.foot}}
  {{/light-table}}
  

Now in all custom components, you can access this value like so:

<span style="background: {{extra.highlightColor}}">{{value}}<span>
  

height

String

Table height.


Default: null

occlusion

Boolean

Toggles occlusion rendering functionality. Currently experimental. If set to true, you must set t.body/estimatedRowHeight:property to something other than the default value.


Default: False

responsive

Boolean

Enable responsive behavior


Default: false

sharedOptions

Object private

Table component shared options

tableActions

Object

This is used to propagate custom user defined actions to custom cell and header components. As an example, lets say I have a table with a column defined with cellComponent: 'delete-user'

{{#light-table table tableActions=(hash
    deleteUser=(action 'deleteUser')
   ) as |t|}}
    {{t.head}}
    {{t.body}}
    {{t.foot}}
  {{/light-table}}
  

Now in the delete-user component, we can access that deleteUser action and pass it the row object which will bubble all the way to where you defined that action.

<button {{action tableActions.deleteUser row}}>Delete Me</button>
  

tableClassNames

String

Class names that will be added to all

tags


Default: ''

totalWidth

Number private

Calculates the total width of the visible columns via their width propert.

Returns 0 for the following conditions

  • All widths are not set
  • Widths are not the same unit
  • Unit cannot be determined

onAfterResponsiveChange

onAfterResponsiveChange action. Called after all column visibility has been altered.

Event Payload:

  • matches Array

    list of matching breakpoints

onBeforeResponsiveChange

onBeforeResponsiveChange action. Called before any column visibility is altered.

Event Payload:

  • matches Array

    list of matching breakpoints