Customization
ContextAwareComponent
Section titled “ContextAwareComponent”ContextAwareComponent<
Context> =React.ComponentType<{context:Context; }>
Used for the custom components that accept the data table context prop.
Type Parameters
Section titled “Type Parameters”| Type Parameter | Default type | Description |
|---|---|---|
Context | any | The type of the context passed to the table. |
DataTableComponents
Section titled “DataTableComponents”Component overrides for internal DOM elements of the data table.
Each override receives the same props the default <div> would get, plus the table’s context value.
Type Parameters
Section titled “Type Parameters”| Type Parameter | Default type | Description |
|---|---|---|
Context | unknown | The type of the context passed to the table. |
Properties
Section titled “Properties”LoadingFooter?: ComponentType<LoadingComponentProps<Context>>
Section titled “LoadingFooter?: ComponentType<LoadingComponentProps<Context>>”Override the measured footer rendered for end-of-list loading and error states.
LoadingOverlay?: ComponentType<LoadingComponentProps<Context>>
Section titled “LoadingOverlay?: ComponentType<LoadingComponentProps<Context>>”Override the loading overlay rendered above the table body during refreshes.
LoadingPlaceholder?: ComponentType<LoadingComponentProps<Context>>
Section titled “LoadingPlaceholder?: ComponentType<LoadingComponentProps<Context>>”Override the placeholder rendered while the table is awaiting its first resolved dataset.
Row?: ComponentType<object & RefAttributes<HTMLDivElement> & object>
Section titled “Row?: ComponentType<object & RefAttributes<HTMLDivElement> & object>”Override the element used for data rows (not group header rows). Must forward ref, style, children, and data attributes to the root element.
StickyColumnContainer?: ComponentType<StickyColumnContainerComponentProps & object>
Section titled “StickyColumnContainer?: ComponentType<StickyColumnContainerComponentProps & object>”Override the sticky column container element (used for both left and right sticky columns,
in both row cells and header cells). The data-sticky attribute indicates the side.
StickyHeader?: ComponentType<object & RefAttributes<HTMLDivElement> & object>
Section titled “StickyHeader?: ComponentType<object & RefAttributes<HTMLDivElement> & object>”Override the sticky header wrapper element. Must forward ref, style, and children to the root element.
LoadingComponentProps
Section titled “LoadingComponentProps”Props passed to loading UI component slots.
Type Parameters
Section titled “Type Parameters”| Type Parameter | Default type |
|---|---|
Context | unknown |
Properties
Section titled “Properties”context
Section titled “context”Context
loadingState
Section titled “loadingState”RowComponentProps
Section titled “RowComponentProps”RowComponentProps =
object&React.RefAttributes<HTMLDivElement>
Props passed to the Row component override.
The component must forward ref, style, children, and data attributes to its root element.
Type Declaration
Section titled “Type Declaration”children
Section titled “children”React.ReactNode
data-index
Section titled “data-index”number
data-known-size
Section titled “data-known-size”number
data-table-element-role
Section titled “data-table-element-role”string
data-testid
Section titled “data-testid”string
React.CSSProperties
ScrollElementComponent
Section titled “ScrollElementComponent”ScrollElementComponent<
Context> =React.ComponentType<React.HTMLProps<HTMLDivElement> &object&React.RefAttributes<HTMLDivElement>>
The type of the component that can be used for the scroll element.
Type Parameters
Section titled “Type Parameters”| Type Parameter | Default type | Description |
|---|---|---|
Context | any | The type of the context passed to the list. |
StickyColumnContainerComponentProps
Section titled “StickyColumnContainerComponentProps”Props passed to the StickyColumnContainer component override.
Used for both left and right sticky column containers in rows and headers.
The data-sticky attribute indicates which side (“left” or “right”).
Properties
Section titled “Properties”children
Section titled “children”ReactNode
data-sticky
Section titled “data-sticky”"left" | "right"
CSSProperties
StickyHeaderComponentProps
Section titled “StickyHeaderComponentProps”StickyHeaderComponentProps =
object&React.RefAttributes<HTMLDivElement>
Props passed to the StickyHeader component override.
The component must forward ref, style, and children to its root element.
Type Declaration
Section titled “Type Declaration”children
Section titled “children”React.ReactNode
data-table-element-role
Section titled “data-table-element-role”string
React.CSSProperties