virtualize prop
The virtualize prop controls which axis is virtualized. The height prop is required
in all virtualization modes:
Basic virtualization
Set virtualize="rows" to render only the rows visible in the viewport:
Row height estimate
Set estimateRowHeight to estimate row height before virtualized rows are measured.
Return 'auto' from getRowHeight to let rows grow to fit wrapped content:
Virtual scroll config
Fine-tune virtual scroll behavior with the virtualScrollConfig prop:
overscan– number of rows rendered above and below the visible area,10by defaultestimateSize– function that returns the estimated row height in px
Infinite scroll
Use the onScrollToBottom callback to load more data when the user scrolls near the bottom of the grid.
It works with or without virtualization. Combine it with loading and loadingVariant="bar" to show
progress without hiding the rows that are already loaded:
Column virtualization
Set virtualize="columns" to render only the columns visible in the horizontal scroll area.
Use it for grids with 50 or more columns. Fine-tune behavior with the virtualColumnConfig prop:
Set virtualize="rows,columns" for grids with many rows and many columns.
Parity with the table body
The virtualized body renders div elements with ARIA grid roles instead of a <table>.
It looks and behaves like the table body, and its header is always sticky. See the table
below for the features that are not supported.
Feature compatibility
Performance tips
Virtualization keeps the number of rendered rows small, the rest of the cost is in your options
and cell renderers. See Performance for the rendering model, stable
options and large data sets. Adjust overscan to the row height: fewer rows for tall rows,
more for short rows.
Accessibility
The virtualized grid sets aria-rowcount, aria-rowindex and aria-colindex. Screen readers
announce the row position (for example "row 500 of 100,000") even though only a part of the rows
is in the DOM. Keyboard navigation follows the same focus model as the table body, see
Accessibility.