Table
Component | Source Code
extends Omit<ComponentPropsWithRef<“table”>, “rows” | “headers”>
Props Inheritance Hierarchy: Omit<ComponentPropsWithRef<“table”>, “rows” | “headers”>
Provides a simple way to create tables, with the ability to greatly customize when needed.
Properties
Section titled “Properties”columnHeaders: TableColumnHeader[]
Section titled “columnHeaders: TableColumnHeader[]”disableEmptyTag?: boolean
Section titled “disableEmptyTag?: boolean”(Optional, defaults to false) By default, a short message is shown when the Table doesn’t
have any data. The Table has no data when there are no children and no rows. You can use this
to disable that short message.
emptyTagText?: string
Section titled “emptyTagText?: string”(Optional, defaults to 'No data available') The short message that shows when the Table has
no data. Has no effect if disableEmptyTag is true.
maxHeight?: string
Section titled “maxHeight?: string”The max height of the Table. When this is set, a scrollbar will automatically be added to the Table when necessary, and the column headers will become sticky.
Example
Section titled “Example”'20rem''800px'rows?: TableRow[]
Section titled “rows?: TableRow[]”The rows of the table. If this is provided, then any children provided to the Table
are ignored and the Table is auto-generated from the data provided here.
title?: string
Section titled “title?: string”The title of the table. This should be a descriptive but short name describing what the table is for.