react-table-library
react-table-library copied to clipboard
feat(Virtualized): propagate onItemsRendered prop
This pull request introduces support for tracking which rows are visible in the virtualized table component. The main change is the addition of an onItemsRendered callback, allowing consumers to be notified about the visible and overscanned row indices. This is useful for features like lazy loading, analytics, or dynamic UI updates based on visible rows.
Virtualization API enhancements:
- Added a new
ListOnRowsRenderedParamstype and anOnItemsRenderedcallback type tosrc/types/virtualized.ts, enabling detailed tracking of visible and overscan row indices. - Extended the
VirtualizedPropsinterface with an optionalonItemsRenderedprop to allow users to pass a callback. - Updated the
Virtualizedcomponent to accept and forward theonItemsRenderedprop, wiring it to the underlying virtualized list implementation. [1] [2]