Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface TableCellOptions

Hierarchy

Index

Properties

colSpan?: number | "100%"

The number of columns that the cell should span. If you would like a cell to span an entire row ignoring the other rows and cells, you can set this value to the number of columns within your table or "100%".

grow?: boolean

This is a bit of a "weird" prop since all it does is apply width: 100% to this cell. This will make this specific cell fill the remaining width of the table (if there is any). If no cells have this prop enabled and the fullWidth table configuration is enabled, all cells will have an equal-sized width.

{@inheritDoc TableCellHorizontalAlignment}

header?: boolean

Boolean if all the TableCell components should be rendered as a <th> instead of a <td>. This is really just a convenience prop for the TableHeader component so the user of react-md doesn't need to keep setting the type="th" fot the TableCell if using the low-level components.

internal
lineWrap?: boolean | "padded"

Boolean if the <td> and <th> cells should support line wrapping. This is disabled by default since you normally don't want line wrapping in tables unless it provides additional descriptions or other content.

If this is set to the string "padded", line wrapping will be enabled along with adding some additional vertical padding to each cell.

scope?: "row" | "rowgroup" | "col" | "colgroup"

This prop is only valid when the header prop is enabled or the TableCell is a child of the TableHeader component. This will generally be used with a value of "row" if you have table headers that are at the start of each row instead of at the top of the table.

sticky?: boolean | "cell" | "header" | "header-cell"

If this is a trueish value, the cell will become a sticky cell that will be fixed while the user scrolls the table. When this is a boolean (or inherited from a TableHeader) or set to "header", the cell will act as a sticky header that will be visible for vertical scrolling.

When this is set to "cell", the cell will be fixed to the left or right for horizontal scrolling.

Finally, if this is set to "header-cell", it will be a combination of both vertical and horizontal scrolling. This means that other sticky header cells will scroll beneath this cell.

{@inheritDoc TableCellVerticalAlignment}

Generated using TypeDoc