@equinor/apollo-components 3.1.2-rowfix.3 → 3.1.2-rowfix.5

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 CHANGED
@@ -954,11 +954,12 @@ function VirtualTableBody({
954
954
  getScrollElement: () => containerRef.current,
955
955
  estimateSize: () => 48,
956
956
  measureElement: (element) => element == null ? void 0 : element.getBoundingClientRect().height,
957
- overscan: 2
957
+ overscan: 10
958
958
  });
959
959
  if (!rowVirtualizer)
960
960
  return null;
961
961
  const virtualRows = rowVirtualizer.getVirtualItems();
962
+ console.log("VirtualTableBody", { container: containerRef.current, virtualRows });
962
963
  const paddingTop = virtualRows.length > 0 ? ((_a = virtualRows == null ? void 0 : virtualRows[0]) == null ? void 0 : _a.start) || 0 : 0;
963
964
  const paddingBottom = virtualRows.length > 0 ? rowVirtualizer.getTotalSize() - (((_b = virtualRows == null ? void 0 : virtualRows[virtualRows.length - 1]) == null ? void 0 : _b.end) || 0) : 0;
964
965
  return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(TableBody, {
@@ -1037,6 +1038,7 @@ var DataTableWrapper = import_styled_components16.default.div`
1037
1038
  function DataTable(props) {
1038
1039
  var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r;
1039
1040
  const { columns, data, bannerConfig, cellConfig, sorting } = props;
1041
+ console.log("DataTable");
1040
1042
  const [internalColumnVisibility, setInternalColumnVisibility] = (0, import_react6.useState)({});
1041
1043
  const [columnVisibility, setColumnVisibility] = [
1042
1044
  ((_a = props.columnVisibility) == null ? void 0 : _a.state) ?? internalColumnVisibility,
package/dist/index.mjs CHANGED
@@ -911,11 +911,12 @@ function VirtualTableBody({
911
911
  getScrollElement: () => containerRef.current,
912
912
  estimateSize: () => 48,
913
913
  measureElement: (element) => element == null ? void 0 : element.getBoundingClientRect().height,
914
- overscan: 2
914
+ overscan: 10
915
915
  });
916
916
  if (!rowVirtualizer)
917
917
  return null;
918
918
  const virtualRows = rowVirtualizer.getVirtualItems();
919
+ console.log("VirtualTableBody", { container: containerRef.current, virtualRows });
919
920
  const paddingTop = virtualRows.length > 0 ? ((_a = virtualRows == null ? void 0 : virtualRows[0]) == null ? void 0 : _a.start) || 0 : 0;
920
921
  const paddingBottom = virtualRows.length > 0 ? rowVirtualizer.getTotalSize() - (((_b = virtualRows == null ? void 0 : virtualRows[virtualRows.length - 1]) == null ? void 0 : _b.end) || 0) : 0;
921
922
  return /* @__PURE__ */ jsxs10(TableBody, {
@@ -994,6 +995,7 @@ var DataTableWrapper = styled16.div`
994
995
  function DataTable(props) {
995
996
  var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r;
996
997
  const { columns, data, bannerConfig, cellConfig, sorting } = props;
998
+ console.log("DataTable");
997
999
  const [internalColumnVisibility, setInternalColumnVisibility] = useState5({});
998
1000
  const [columnVisibility, setColumnVisibility] = [
999
1001
  ((_a = props.columnVisibility) == null ? void 0 : _a.state) ?? internalColumnVisibility,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@equinor/apollo-components",
3
- "version": "3.1.2-rowfix.3",
3
+ "version": "3.1.2-rowfix.5",
4
4
  "license": "MIT",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",