Components.ModelsTableRow Class
Table body row is used within models-table/table-body.
Usage example:
<ModelsTable @data={{data}} @columns={{columns}} as |MT|>
<MT.Table as |Table|>
<Table.Body as |Body|>
{{#each Body.visibleContent as |record index|}}
<Body.Row @record={{record}} @index={{index}} />
{{/each}}
{{! ... }}
</Table.Header>
{{! ... }}
</MT.Table>
{{! .... }}
</ModelsTable>
Usage with a block context:
<ModelsTable @data={{data}} @columns={{columns}} as |MT|>
<MT.Table as |Table|>
<Table.Body as |Body|>
{{#each Body.visibleContent as |record index|}}
<Body.Row @record={{record}} @index={{index}} as |Row|>
{{#each MT.visibleProcessedColumns as |column|}}
<Row.Cell @column={{column}} @index={{index}} />
{{/each}}
</Body.Row>
{{/each}}
{{! ... }}
</Table.Body>
{{! ... }}
</MT.Table>
{{! .... }}
</ModelsTable>
Important! You must bound record
and index
to the row
.
ModelsTableTableRow yields references to the following contextual components:
- models-table/cell - component represents each row's cell
- models-table/row-group-toggle - component is used to toggle rows group visibility
- models-table/row-select-checkbox - component is used to toggle row selection
- models-table/expand-toggle - component is used to expand or collapse row
Check own docs for each component to get detailed info.
References to the following properties are yielded:
- isEditRow -
true
if row in the Edit-mode - isFirstGroupedRow -
true
if row is first in the rows group (flag used when rows grouping is used) - rowspanForFirstCell
References to the following actions are yielded:
- editRow - action to set row to the Edit-mode
- saveRow - action to save row and turn off Edit-mode
- cancelEditRow - action to cancel changes done to the row and turn off Edit-mode
Item Index
Properties
- collapsedGroupValues
- currentGroupingPropertyName
- data
- displayGroupedValueAs
- expandedGroupedItems
- expandedGroupItems
- groupedItems
- groupedLength
- groupedValue
- index
- isEditRow
- isExpanded
- isFirstGroupedRow
- isSelected
- rowExpandedClass
- rowSelectedClass
- rowspanForFirstCell
- selectedGroupedItems
- shouldShowGroupToggleCell
- tagName
- themeInstance
- useDataGrouping
- visibleGroupedItems
- visibleProcessedColumns
Properties
groupedValue
Default: null
visibleProcessedColumns
Utils.ModelsTableColumn[]
Bound from ModelsTable.visibleProcessedColumns
Default: null
Events
cancelEditRow
protected
Indicate the edit on the row has been cancelled, the row is no longer in edit mode
clickOnRow
Closure action ModelsTable.clickOnRow
collapseAllRows
Closure action ModelsTable.collapseAllRows
collapseRow
Closure action ModelsTable.collapseRow
doToggleGroupedRows
protected
doubleClickOnRow
Closure action ModelsTable.doubleClickOnRow
editRow
protected
Place a row into edit mode
expandAllRows
Closure action ModelsTable.expandAllRows
expandRow
Closure action ModelsTable.expandRow
handleMouseEnter
protected
handleMouseLeave
protected
hoverOnRow
Closure action ModelsTable.hoverOnRow
outRow
Closure action ModelsTable.outRow
saveRow
protected
Indicate a row has been saved, the row is no longer in edit mode
toggleGroupedRows
Closure action ModelsTable.toggleGroupedRows
toggleGroupedRowsExpands
Closure action ModelsTable.toggleGroupedRowsExpands
toggleGroupedRowsSelection
Closure action ModelsTable.toggleGroupedRowsSelection