@insticc/react-datagrid-2 1.0.21 → 1.0.23

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.
@@ -109,7 +109,13 @@ var ExportActions = function ExportActions(props) {
109
109
  var tableData = rows.map(function (row) {
110
110
  return Object.values(row.original);
111
111
  });
112
- var columnsToExport = ["templateCodeCustom", "subject", "body"];
112
+ var columns = props.table.getAllFlatColumns();
113
+ var columnsToExport = [];
114
+ columns.forEach(function (col) {
115
+ if (col.id !== 'mrt-row-expand' || col.id !== 'mrt-row-expand') {
116
+ columnsToExport.push(col.id);
117
+ }
118
+ });
113
119
  // Get the column headers and data for the selected columns
114
120
  // Iterate through the rows and format the data for the PDF
115
121
  var pageWidth = doc.internal.pageSize.width; // Get page width
@@ -78,7 +78,9 @@ var DataGrid = function DataGrid(_ref) {
78
78
  _ref$enablePagination = _ref.enablePagination,
79
79
  enablePagination = _ref$enablePagination === void 0 ? true : _ref$enablePagination,
80
80
  _ref$enableVirtualiza = _ref.enableVirtualization,
81
- enableVirtualization = _ref$enableVirtualiza === void 0 ? false : _ref$enableVirtualiza;
81
+ enableVirtualization = _ref$enableVirtualiza === void 0 ? false : _ref$enableVirtualiza,
82
+ _ref$gridHeight = _ref.gridHeight,
83
+ gridHeight = _ref$gridHeight === void 0 ? 600 : _ref$gridHeight;
82
84
  var _useState = (0, _react.useState)(selectedIds.reduce(function (a, v) {
83
85
  return _objectSpread(_objectSpread({}, a), {}, _defineProperty({}, v, true));
84
86
  }, {})),
@@ -399,7 +401,7 @@ var DataGrid = function DataGrid(_ref) {
399
401
  },
400
402
  muiTableContainerProps: {
401
403
  sx: {
402
- maxHeight: '600px'
404
+ maxHeight: gridHeight
403
405
  }
404
406
  },
405
407
  defaultDisplayColumn: {
@@ -552,7 +554,8 @@ DataGrid.propTypes = {
552
554
  enableFullScreenToggle: _propTypes["default"].bool,
553
555
  enableDensityToggle: _propTypes["default"].bool,
554
556
  enableGlobalFilter: _propTypes["default"].bool,
555
- enableVirtualization: _propTypes["default"].bool
557
+ enableVirtualization: _propTypes["default"].bool,
558
+ gridHeight: _propTypes["default"].oneOfType([_propTypes["default"].number, _propTypes["default"].string]) // defines the height of the grid content, can be a number like 600, or a string like '600px' or 'fit-content'
556
559
  };
557
560
  var _default = exports["default"] = DataGrid; // DataGrid.defaultProps = {
558
561
  // hasExcelExport: false,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@insticc/react-datagrid-2",
3
- "version": "1.0.21",
3
+ "version": "1.0.23",
4
4
  "description": "",
5
5
  "main": "build/index.js",
6
6
  "scripts": {