@equinor/apollo-components 3.1.2-rowfix.8 → 3.1.2-rowfix.9
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.
- package/dist/index.js +3 -3
- package/dist/index.mjs +3 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -951,7 +951,7 @@ function VirtualTableBody({
|
|
|
951
951
|
const { rows } = table.getRowModel();
|
|
952
952
|
const rowVirtualizer = (0, import_react_virtual.useVirtualizer)({
|
|
953
953
|
count: rows.length,
|
|
954
|
-
getScrollElement: () => containerRef
|
|
954
|
+
getScrollElement: () => containerRef,
|
|
955
955
|
estimateSize: () => 48,
|
|
956
956
|
measureElement: (element) => element == null ? void 0 : element.getBoundingClientRect().height,
|
|
957
957
|
overscan: 2
|
|
@@ -959,7 +959,7 @@ function VirtualTableBody({
|
|
|
959
959
|
if (!rowVirtualizer)
|
|
960
960
|
return null;
|
|
961
961
|
const virtualRows = rowVirtualizer.getVirtualItems();
|
|
962
|
-
console.log("VirtualTableBody", { container: containerRef
|
|
962
|
+
console.log("VirtualTableBody", { container: containerRef, virtualRows });
|
|
963
963
|
const paddingTop = virtualRows.length > 0 ? ((_a = virtualRows == null ? void 0 : virtualRows[0]) == null ? void 0 : _a.start) || 0 : 0;
|
|
964
964
|
const paddingBottom = virtualRows.length > 0 ? rowVirtualizer.getTotalSize() - (((_b = virtualRows == null ? void 0 : virtualRows[virtualRows.length - 1]) == null ? void 0 : _b.end) || 0) : 0;
|
|
965
965
|
return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(TableBody, {
|
|
@@ -1155,7 +1155,7 @@ function DataTable(props) {
|
|
|
1155
1155
|
table
|
|
1156
1156
|
}),
|
|
1157
1157
|
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(VirtualTableBody, {
|
|
1158
|
-
containerRef: tableContainerRef,
|
|
1158
|
+
containerRef: tableContainerRef.current,
|
|
1159
1159
|
tableCaption: props.tableCaption,
|
|
1160
1160
|
table,
|
|
1161
1161
|
rowConfig,
|
package/dist/index.mjs
CHANGED
|
@@ -908,7 +908,7 @@ function VirtualTableBody({
|
|
|
908
908
|
const { rows } = table.getRowModel();
|
|
909
909
|
const rowVirtualizer = useVirtualizer({
|
|
910
910
|
count: rows.length,
|
|
911
|
-
getScrollElement: () => containerRef
|
|
911
|
+
getScrollElement: () => containerRef,
|
|
912
912
|
estimateSize: () => 48,
|
|
913
913
|
measureElement: (element) => element == null ? void 0 : element.getBoundingClientRect().height,
|
|
914
914
|
overscan: 2
|
|
@@ -916,7 +916,7 @@ function VirtualTableBody({
|
|
|
916
916
|
if (!rowVirtualizer)
|
|
917
917
|
return null;
|
|
918
918
|
const virtualRows = rowVirtualizer.getVirtualItems();
|
|
919
|
-
console.log("VirtualTableBody", { container: containerRef
|
|
919
|
+
console.log("VirtualTableBody", { container: containerRef, virtualRows });
|
|
920
920
|
const paddingTop = virtualRows.length > 0 ? ((_a = virtualRows == null ? void 0 : virtualRows[0]) == null ? void 0 : _a.start) || 0 : 0;
|
|
921
921
|
const paddingBottom = virtualRows.length > 0 ? rowVirtualizer.getTotalSize() - (((_b = virtualRows == null ? void 0 : virtualRows[virtualRows.length - 1]) == null ? void 0 : _b.end) || 0) : 0;
|
|
922
922
|
return /* @__PURE__ */ jsxs10(TableBody, {
|
|
@@ -1112,7 +1112,7 @@ function DataTable(props) {
|
|
|
1112
1112
|
table
|
|
1113
1113
|
}),
|
|
1114
1114
|
/* @__PURE__ */ jsx19(VirtualTableBody, {
|
|
1115
|
-
containerRef: tableContainerRef,
|
|
1115
|
+
containerRef: tableContainerRef.current,
|
|
1116
1116
|
tableCaption: props.tableCaption,
|
|
1117
1117
|
table,
|
|
1118
1118
|
rowConfig,
|