Skip to content

Components

Cell(__namedParameters): null

Declares the cell renderer for the current column.

ParameterType
__namedParametersProps

null


CellRenderFunction = (params) => ReactNode

The render function used by a cell definition.

ParameterType
paramsCellRenderParams

ReactNode


The parameters passed to a cell renderer.

unknown


ColumnInfo


string


ColumnState


boolean


Row<unknown>


Column(__namedParameters): Element

Declares a visible column in the table.

ParameterType
__namedParametersProps

Element


ColumnGroup(__namedParameters): Element

Groups related columns under a shared header.

ParameterType
__namedParametersProps

Element


ColumnGroupHeader(props): null

Declares the header renderer for the current column group.

ParameterType
propsProps

null


ColumnGroupHeaderCustomComponent = React.ComponentType<ColumnGroupHeaderRenderParams>

A React component variant for a column group header.


ColumnGroupHeaderRenderFunction = (params) => ReactNode

The render function used by a column group header.

ParameterType
paramsColumnGroupHeaderRenderParams

ReactNode


The parameters passed to a column group header renderer.

string[]


ColumnGroupInfo


string


number


Describes a registered column group.

string[]


string[]


number


string




ColumnHeader(props): ReactElement<unknown, string | JSXElementConstructor<any>>[] | null

Declares the header renderer for the current column.

ParameterType
propsProps

ReactElement<unknown, string | JSXElementConstructor<any>>[] | null


ColumnHeaderCustomComponent = React.ComponentType<ColumnHeaderRenderParams>

A React component variant for a column header.


ColumnHeaderRenderFunction = (params) => ReactNode

The render function used by a column header.

ParameterType
paramsColumnHeaderRenderParams

ReactNode


The parameters passed to a column header renderer.

ColumnInfo


string


ColumnState


boolean


Describes a registered column in the table.

string





DynamicColumns<Row, Group>(__namedParameters): Element

Declares columns from the table’s first non-empty data result.

DynamicColumns renders nothing until the table captures data, then calls its render function with stable data and model references for the current table engine lifetime. The render function follows normal React render semantics and may be called again if React re-renders this component.

To discover columns again, remount the table by changing the key on VirtuosoDataTable.

Type ParameterDefault type
Row-
Groupnever
ParameterType
__namedParametersDynamicColumnsProps<Row, Group>

Element


The properties accepted by the DynamicColumns component.

Type ParameterDefault type
Row-
Groupnever

children: (params) => ReactNode

ParameterType
paramsDynamicColumnsRenderParams<Row, Group>

ReactNode


The parameters passed to the DynamicColumns render function after the table captures its first non-empty data result.

Type ParameterDefault type
Row-
Groupnever

data: readonly (Row | Group)[]


DataModelHandle<Row | Group>


GroupHeaderCell(props): null

Declares the renderer used for group header rows.

ParameterType
propsProps

null


GroupHeaderCustomComponent = React.ComponentType<GroupHeaderRenderParams>

A React component variant for a group header row.


GroupHeaderRenderFunction = (params) => ReactNode

The render function used by a group header row.

ParameterType
paramsGroupHeaderRenderParams

ReactNode


The parameters passed to a group header renderer.

number


Row<unknown>


The properties accepted by the Cell component.

CellRenderFunction



The properties accepted by the Column component.


string

ColumnInfo.field


ColumnInfo.groupId


ColumnInfo.sticky


ColumnInfo.visible


The properties accepted by the ColumnGroup component.



Props = { children: ColumnGroupHeaderRenderFunction; className?: string; } | { className?: string; component: ColumnGroupHeaderCustomComponent; }

The properties accepted by the ColumnGroupHeader component.


Props = { children?: ColumnHeaderChildren; className?: string; } | { className?: string; component: ColumnHeaderCustomComponent; }

The properties accepted by the ColumnHeader component.


Props = { children: GroupHeaderRenderFunction; className?: string; } | { className?: string; component: GroupHeaderCustomComponent; }

The properties accepted by the GroupHeaderCell component.


ScrollerProps = Omit<React.HTMLProps<HTMLDivElement>, "ref" | "data" | "onScroll">

The DOM attributes that you can pass to the VirtuosoDataTable component to customize the scroll element.


The properties accepted by the VirtuosoDataTable component. In addition to the properties listed here, you can pass any other props that are accepted by a div element. They will be passed to the root div element used for the scroll.

Type ParameterDefault typeDescription
Data-The type of the data items in the table.
Context-The type of the context passed to the table.
Groupunknown-

Any children passed to the component.

ScrollerProps.children


The number of extra columns to render on each side of the visible columns. Useful for smooth horizontal scrolling. Defaults to 0 (no overscan).


Component overrides for internal DOM elements like rows, sticky headers, and sticky column containers. See DataTableComponents for available slots.


optional computeRowKey: NoInfer<(params) => Key>

Computes the value for the React key prop for the item at the specified index. Use stable, unique keys to avoid rendering issues.

The parameters to compute the key.


Any additional state that you need to use in the ItemContent, EmptyPlaceholder, etc.


Pass an HTML element to use as the scroll element. This is useful when you want to include additional content in the scrollable area, or if you want to use a complex custom scroll component.


An optional React component to render when the table has zero data items.


Optional stable engine ID for remote access via useRemote* hooks. When provided, sibling or ancestor components can read from and publish to the table engine using this ID.


Optional reactive ref to expose the table engine instance. Create it with useEngineRef() and use it with useRemote* hooks from outside the table tree.


Artificially extends the viewport size in both directions, causing more items to be rendered. Useful if you have relatively heavy items or want images to be loaded before the user scrolls to them. For example, setting the value to 100 would increase the viewport in both directions by 100 pixels, causing more items to be rendered.


The initial location to scroll to. It will be applied the first time the table is rendered with data. Using this property allows you to skip rendering of the items at the top of the table.


DataModelHandle<Data | Group>

A data model handle that provides data to the table through a message-exchange protocol.


optional onRenderedDataChange: (range) => void

A callback that’s invoked when the currently visible items change

ParameterType
rangeData[]

void


optional onScroll: (location) => void

A callback that’s invoked when the table is scrolled. See ListScrollLocation for the details of the parameter received.

ParameterType
locationListScrollLocation

void


An optional React component to replace the default scroller element. The default value is a div element.


Set to true to make the table use the document scroller rather than wrapping in its own.