material-react-table 0.19.0-alpha.1 → 0.21.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -3019,13 +3019,20 @@ var MRT_TableBody = function MRT_TableBody(_ref) {
3019
3019
  return enablePagination ? getRowModel().rows : getPrePaginationRowModel().rows;
3020
3020
  }, [enableGlobalFilterRankedResults, enableGlobalFilterRankedResults && globalFilter || !enablePagination ? getPrePaginationRowModel().rows : getRowModel().rows, globalFilter]);
3021
3021
  var rowVirtualizer = enableRowVirtualization ? useVirtual(_extends({
3022
- overscan: density === 'compact' ? 20 : 10,
3023
- size: rows.length,
3024
- parentRef: tableContainerRef
3022
+ // estimateSize: () => (density === 'compact' ? 25 : 50),
3023
+ overscan: density === 'compact' ? 30 : 10,
3024
+ parentRef: tableContainerRef,
3025
+ size: rows.length
3025
3026
  }, virtualizerProps)) : {};
3026
- var virtualRows = rowVirtualizer.virtualItems;
3027
- var paddingTop = (virtualRows == null ? void 0 : virtualRows.length) > 0 ? virtualRows[0].start : 0;
3028
- var paddingBottom = (virtualRows == null ? void 0 : virtualRows.length) > 0 ? rowVirtualizer.totalSize - virtualRows[virtualRows.length - 1].end : 0;
3027
+ var virtualRows = enableRowVirtualization ? rowVirtualizer.virtualItems : [];
3028
+ var paddingTop = 0;
3029
+ var paddingBottom = 0;
3030
+
3031
+ if (enableRowVirtualization) {
3032
+ paddingTop = virtualRows.length > 0 ? virtualRows[0].start : 0;
3033
+ paddingBottom = virtualRows.length > 0 ? rowVirtualizer.totalSize - virtualRows[virtualRows.length - 1].end : 0;
3034
+ }
3035
+
3029
3036
  return React.createElement(TableBody, Object.assign({}, tableBodyProps), enableRowVirtualization && paddingTop > 0 && React.createElement("tr", null, React.createElement("td", {
3030
3037
  style: {
3031
3038
  height: paddingTop + "px"