Package com.vaadin.flow.component.html
Interface TableRowContainer
- All Superinterfaces:
HasComponentsOfType<TableRow>,HasElement,HasEnabled,Serializable
A container of
<tr> elements, implemented by
TableHead, TableBody and TableFoot.
The WHATWG HTML specification allows nothing but rows inside those three
elements, which is what HasComponentsOfType expresses: the standard
add, remove, replace and
bindChildren operations are all available, but only for TableRow, so
an unrelated component is rejected at compile time rather than producing
invalid markup. What this interface adds on top are the row factories, which
create a row and attach it in one call.
Implementers must be Component instances.
- Since:
- 25.3
-
Method Summary
Methods inherited from interface com.vaadin.flow.component.HasComponentsOfType
add, add, addComponentAsFirst, addComponentAtIndex, bindChildren, getChildren, getComponentAt, getComponentCount, indexOf, remove, remove, removeAll, replaceMethods inherited from interface com.vaadin.flow.component.HasElement
getElementMethods inherited from interface com.vaadin.flow.component.HasEnabled
bindEnabled, isEnabled, setEnabled
-
Method Details
-
getRows
Returns the rows in this container, in document order. This is the typed counterpart ofHasComponentsOfType.getChildren().- Returns:
- the rows in this container.
-
addRow
Creates a new empty row and appends it to this container.- Returns:
- the new row.
-
insertRow
Creates a new empty row and inserts it at the given position.- Parameters:
position- the position to insert the row at, between 0 and the number of children in this container.- Returns:
- the new row.
-