@vendorflow/components 2.0.76 → 2.0.77

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.
@@ -46,12 +46,12 @@ function DataTable() {
46
46
  enabled: true,
47
47
  },
48
48
  pagination: {
49
- enabled: true,
49
+ enabled: false,
50
50
  rowsPerPageOptions: [5, 10, 20],
51
51
  pageSize: 10,
52
52
  },
53
53
  virtualize: {
54
- enabled: false,
54
+ enabled: true,
55
55
  },
56
56
  rowSelect: {
57
57
  enabled: true,
@@ -68,7 +68,7 @@ function DataTable() {
68
68
  columns: columns,
69
69
  data: data,
70
70
  options: options,
71
- defaultColumn: { minWidth: 50, width: 150, maxWidth: 200 },
71
+ defaultColumn: { minWidth: 50, width: 150 },
72
72
  });
73
73
  return (react_1.default.createElement(material_1.ThemeProvider, { theme: (0, material_1.createTheme)() },
74
74
  react_1.default.createElement("div", { style: { height: '700px', width: '640px' } },
@@ -28,6 +28,16 @@ var react_2 = require("react");
28
28
  function TableBodyContent(_a) {
29
29
  var defaultRowHeight = _a.defaultRowHeight, ExpandedComponent = _a.ExpandedComponent, hasScrollbarRefCallback = _a.hasScrollbarRefCallback, height = _a.height, isVirtualizeEnabled = _a.isVirtualizeEnabled, noMatchLabel = _a.noMatchLabel, prepareRow = _a.prepareRow, scrollContainerRef = _a.scrollContainerRef, setScrollLeft = _a.setScrollLeft, tableBodyRef = _a.tableBodyRef, tableBodyMeasureRefCallback = _a.tableBodyMeasureRefCallback, tableRows = _a.tableRows, totalColumnsWidth = _a.totalColumnsWidth, width = _a.width;
30
30
  var cache = (0, react_2.useRef)(new react_virtualized_1.CellMeasurerCache({ fixedWidth: true, defaultHeight: defaultRowHeight, defaultWidth: totalColumnsWidth }));
31
+ (0, react_2.useEffect)(function () {
32
+ if (isVirtualizeEnabled) {
33
+ cache.current = new react_virtualized_1.CellMeasurerCache({
34
+ fixedWidth: true,
35
+ defaultHeight: defaultRowHeight,
36
+ defaultWidth: totalColumnsWidth,
37
+ });
38
+ cache.current.clearAll();
39
+ }
40
+ }, [totalColumnsWidth]);
31
41
  function renderRow(_a) {
32
42
  var columnIndex = _a.columnIndex, rowIndex = _a.rowIndex, key = _a.key, parent = _a.parent, style = _a.style;
33
43
  var row = tableRows[rowIndex];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vendorflow/components",
3
- "version": "2.0.76",
3
+ "version": "2.0.77",
4
4
  "description": "React components for vendorflow",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",