The Table component is used to show information from a data set.
View source codeTableColumn<T>[]The columns to display.
T[]The data to display.
stringclassName for the element.
SortStateDefines the default sort state (direction and column id). Sorting capability is disabled when groupBy is provided.
Default: { direction: 'none', columnId: null, }{ title: string; subtitle?: ReactNode; }The content to display if the data is empty.
ReactNodeThe footer of the Table.
(row: T) => booleanFunction to get whether a row is active.
(option: T) => booleanGet whether a given row should be checkable. By default, all options can be checked.
(row: T) => booleanFunction to get whether a row is disabled.
(row: T) => stringFunction to get a row's unique identifier.
(row: T) => TableVariantFunction to get the row's visual style.
(row: T) => stringFunction to group row together. Disable sorting capability.
string | numberThe maximum height of the Table (will allow the rows to be scrollable).
NextSortDirectionDefines the direction following each sort direction. Sorting capability is disabled when groupBy is provided.
Default: { // when you click on an unsorted column, it goes to Descending order none: 'descending', descending: 'ascending', ascending: 'none', }(rows: T[], rowIds: string[], isChecked: boolean) => voidHandler that is called when the top checkbox state changes.
(row: T) => voidHandler that is called when a row is clicked.
(row: T, rowId: string, isChecked: boolean) => voidHandler that is called when the selection changes.
(value: string, aggregatedRows: T[]) => ReactNodeRender function for grouped option. If not provided, the key returned by groupBy will be displayed
"compact" | "normal"The size of the rows.
Default: normalstring[]The current checked items in the Table.
TableMiniColumn<T>[]The columns to display.
T[]The data to display.
(row: T) => stringFunction to get a row's unique identifier.
stringclassName for the element.