Components.ModelsTableTableBody Class
Table body used within models-table/table.
Component contains rows for each record, row expands (if provided) and components for situations with missing data or when all columns are hidden.
Usage example:
{{#models-table data=data columns=columns as |mt|}}
{{#mt.table as |table|}}
{{table.body}}
{{! ... }}
{{/mt.table}}
{{! .... }}
{{/models-table}}
Usage with a block context:
{{#models-table data=data columns=columns as |mt|}}
{{#mt.table as |table|}}
{{#table.body as |body|}}
{{#if body.allColumnsAreHidden}}
{{body.columns-hidden}}
{{else}}
{{#if body.visibleContent.length}}
{{#each body.visibleContent as |record index|}}
{{body.row record=record index=index}}
{{#if (exists-in body.expandedItems record)}}
{{body.row-expand record=record index=index}}
{{/if}}
{{/each}}
{{else}}
{{body.no-data}}
{{/if}}
{{/if}}
{{/table.body}}
{{! ... }}
{{/mt.table}}
{{! .... }}
{{/models-table}}
ModelsTableTableHeader yields references to the following contextual components:
- models-table/columns-hidden - component used when all columns are hidden and no data items are shown. Usually it contains a simple message
- models-table/row - component represents each table-body row with a single record.
- models-table/row-expand - component with extra data shown when selected row is expanded
- models-table/row-grouping - component with grouped property value. Used to toggle row group
- models-table/no-data - component used when no data provided to the table. Usually it contains a simple message
Check own docs for each component to get detailed info.
Item Index
Properties
- allColumnsAreHidden
- collapsedGroupValues
- columnsCount
- currentGroupingPropertyName
- data
- dataGroupOptions
- displayGroupedValueAs
- expandedItems
- expandedRowComponent
- groupedArrangedContent
- groupedVisibleContent
- groupedVisibleContentValuesOrder
- groupingRowComponent
- groupSummaryRowComponent
- selectedItems
- themeInstance
- useDataGrouping
- visibleContent
- visibleProcessedColumns
Properties
groupedVisibleContentValuesOrder
Array
Bound from ModelsTable.groupedVisibleContentValuesOrder
Default: null
visibleProcessedColumns
ModelsTableColumn
Bound from ModelsTable.visibleProcessedColumns
Default: null
Events
clickOnRow
Closure action ModelsTable.actions.clickOnRow
collapseAllRows
Closure action ModelsTable.actions.collapseAllRows
collapseRow
Closure action ModelsTable.actions.collapseRow
doubleClickOnRow
Closure action ModelsTable.actions.doubleClickOnRow
expandAllRows
Closure action ModelsTable.actions.expandAllRows
expandRow
Closure action ModelsTable.actions.expandRow
hoverOnRow
Closure action ModelsTable.actions.hoverOnRow
outRow
Closure action ModelsTable.actions.outRow
sendAction
Closure action ModelsTable.actions.sendAction
toggleGroupedRows
Closure action ModelsTable.actions.toggleGroupedRows
toggleGroupedRowsExpands
Closure action ModelsTable.actions.toggleGroupedRowsExpands
toggleGroupedRowsSelection
Closure action ModelsTable.actions.toggleGroupedRowsSelection