Skip to main content

Table Virtuoso Basic Example

The TableVirtuoso component can display large tables with unknown row sizes. It has most of the Virtuoso capabilities sans pinning top items. It also supports sticky table headers. You do not have to configure anything apart from the data or the totalCount and the itemContent renderer.

The itemContent render callback accepts index, and item parameter (if data is set), which specifies the absolute index of the item rendered; It is up to you to build and return the respective content.

Styling and markup

The component renders an HTML table structure. Few CSS settings can affect its look:

  • A border-collapse: collapse setting on table causes the fixed header borders to scroll away. To fix, use border-collapse: separate and specify bottom/right borders.
  • table should not have styling that changes its display and overflow.

Table with data

loading...

Table with totalCount

loading...

Table with useWindowScroll

loading...