material-react-table 0.7.2 → 0.7.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.
@@ -235,21 +235,21 @@ var MRT_ExpandButton = function MRT_ExpandButton(_ref) {
235
235
  }));
236
236
  };
237
237
 
238
- var MRT_FILTER_TYPE;
239
-
240
- (function (MRT_FILTER_TYPE) {
241
- MRT_FILTER_TYPE["BEST_MATCH"] = "bestMatch";
242
- MRT_FILTER_TYPE["BEST_MATCH_FIRST"] = "bestMatchFirst";
243
- MRT_FILTER_TYPE["CONTAINS"] = "contains";
244
- MRT_FILTER_TYPE["EMPTY"] = "empty";
245
- MRT_FILTER_TYPE["ENDS_WITH"] = "endsWith";
246
- MRT_FILTER_TYPE["EQUALS"] = "equals";
247
- MRT_FILTER_TYPE["GREATER_THAN"] = "greaterThan";
248
- MRT_FILTER_TYPE["LESS_THAN"] = "lessThan";
249
- MRT_FILTER_TYPE["NOT_EMPTY"] = "notEmpty";
250
- MRT_FILTER_TYPE["NOT_EQUALS"] = "notEquals";
251
- MRT_FILTER_TYPE["STARTS_WITH"] = "startsWith";
252
- })(MRT_FILTER_TYPE || (MRT_FILTER_TYPE = {}));
238
+ var MRT_FILTER_OPTION;
239
+
240
+ (function (MRT_FILTER_OPTION) {
241
+ MRT_FILTER_OPTION["BEST_MATCH"] = "bestMatch";
242
+ MRT_FILTER_OPTION["BEST_MATCH_FIRST"] = "bestMatchFirst";
243
+ MRT_FILTER_OPTION["CONTAINS"] = "contains";
244
+ MRT_FILTER_OPTION["EMPTY"] = "empty";
245
+ MRT_FILTER_OPTION["ENDS_WITH"] = "endsWith";
246
+ MRT_FILTER_OPTION["EQUALS"] = "equals";
247
+ MRT_FILTER_OPTION["GREATER_THAN"] = "greaterThan";
248
+ MRT_FILTER_OPTION["LESS_THAN"] = "lessThan";
249
+ MRT_FILTER_OPTION["NOT_EMPTY"] = "notEmpty";
250
+ MRT_FILTER_OPTION["NOT_EQUALS"] = "notEquals";
251
+ MRT_FILTER_OPTION["STARTS_WITH"] = "startsWith";
252
+ })(MRT_FILTER_OPTION || (MRT_FILTER_OPTION = {}));
253
253
 
254
254
  var bestMatchFirst = function bestMatchFirst(rows, columnIds, filterValue) {
255
255
  return matchSorter.matchSorter(rows, filterValue.toString().trim(), {
@@ -387,7 +387,7 @@ var commonMenuItemStyles = {
387
387
  my: 0,
388
388
  alignItems: 'center'
389
389
  };
390
- var MRT_FilterTypeMenu = function MRT_FilterTypeMenu(_ref) {
390
+ var MRT_FilterOptionMenu = function MRT_FilterOptionMenu(_ref) {
391
391
  var anchorEl = _ref.anchorEl,
392
392
  header = _ref.header,
393
393
  onSelect = _ref.onSelect,
@@ -395,97 +395,97 @@ var MRT_FilterTypeMenu = function MRT_FilterTypeMenu(_ref) {
395
395
  tableInstance = _ref.tableInstance;
396
396
  var getState = tableInstance.getState,
397
397
  _tableInstance$option = tableInstance.options,
398
- enabledGlobalFilterTypes = _tableInstance$option.enabledGlobalFilterTypes,
398
+ enabledGlobalFilterOptions = _tableInstance$option.enabledGlobalFilterOptions,
399
399
  localization = _tableInstance$option.localization,
400
- setCurrentFilterTypes = tableInstance.setCurrentFilterTypes,
401
- setCurrentGlobalFilterType = tableInstance.setCurrentGlobalFilterType;
400
+ setCurrentFilterFns = tableInstance.setCurrentFilterFns,
401
+ setCurrentGlobalFilterFn = tableInstance.setCurrentGlobalFilterFn;
402
402
 
403
403
  var _getState = getState(),
404
404
  isDensePadding = _getState.isDensePadding,
405
- currentFilterTypes = _getState.currentFilterTypes,
406
- currentGlobalFilterType = _getState.currentGlobalFilterType;
405
+ currentFilterFns = _getState.currentFilterFns,
406
+ currentGlobalFilterFn = _getState.currentGlobalFilterFn;
407
407
 
408
- var filterTypes = React.useMemo(function () {
408
+ var filterOptions = React.useMemo(function () {
409
409
  return [{
410
- type: MRT_FILTER_TYPE.BEST_MATCH_FIRST,
410
+ type: MRT_FILTER_OPTION.BEST_MATCH_FIRST,
411
411
  label: localization.filterBestMatchFirst,
412
412
  divider: false,
413
413
  fn: bestMatchFirst
414
414
  }, {
415
- type: MRT_FILTER_TYPE.BEST_MATCH,
415
+ type: MRT_FILTER_OPTION.BEST_MATCH,
416
416
  label: localization.filterBestMatch,
417
417
  divider: !!header,
418
418
  fn: bestMatch
419
419
  }, {
420
- type: MRT_FILTER_TYPE.CONTAINS,
420
+ type: MRT_FILTER_OPTION.CONTAINS,
421
421
  label: localization.filterContains,
422
422
  divider: false,
423
423
  fn: contains
424
424
  }, {
425
- type: MRT_FILTER_TYPE.STARTS_WITH,
425
+ type: MRT_FILTER_OPTION.STARTS_WITH,
426
426
  label: localization.filterStartsWith,
427
427
  divider: false,
428
428
  fn: startsWith
429
429
  }, {
430
- type: MRT_FILTER_TYPE.ENDS_WITH,
430
+ type: MRT_FILTER_OPTION.ENDS_WITH,
431
431
  label: localization.filterEndsWith,
432
432
  divider: true,
433
433
  fn: endsWith
434
434
  }, {
435
- type: MRT_FILTER_TYPE.EQUALS,
435
+ type: MRT_FILTER_OPTION.EQUALS,
436
436
  label: localization.filterEquals,
437
437
  divider: false,
438
438
  fn: equals
439
439
  }, {
440
- type: MRT_FILTER_TYPE.NOT_EQUALS,
440
+ type: MRT_FILTER_OPTION.NOT_EQUALS,
441
441
  label: localization.filterNotEquals,
442
442
  divider: true,
443
443
  fn: notEquals
444
444
  }, {
445
- type: MRT_FILTER_TYPE.GREATER_THAN,
445
+ type: MRT_FILTER_OPTION.GREATER_THAN,
446
446
  label: localization.filterGreaterThan,
447
447
  divider: false,
448
448
  fn: greaterThan
449
449
  }, {
450
- type: MRT_FILTER_TYPE.LESS_THAN,
450
+ type: MRT_FILTER_OPTION.LESS_THAN,
451
451
  label: localization.filterLessThan,
452
452
  divider: true,
453
453
  fn: lessThan
454
454
  }, {
455
- type: MRT_FILTER_TYPE.EMPTY,
455
+ type: MRT_FILTER_OPTION.EMPTY,
456
456
  label: localization.filterEmpty,
457
457
  divider: false,
458
458
  fn: empty
459
459
  }, {
460
- type: MRT_FILTER_TYPE.NOT_EMPTY,
460
+ type: MRT_FILTER_OPTION.NOT_EMPTY,
461
461
  label: localization.filterNotEmpty,
462
462
  divider: false,
463
463
  fn: notEmpty
464
464
  }].filter(function (filterType) {
465
- return header ? !header.column.enabledColumnFilterTypes || header.column.enabledColumnFilterTypes.includes(filterType.type) : (!enabledGlobalFilterTypes || enabledGlobalFilterTypes.includes(filterType.type)) && [MRT_FILTER_TYPE.BEST_MATCH_FIRST, MRT_FILTER_TYPE.BEST_MATCH].includes(filterType.type);
465
+ return header ? !header.column.enabledColumnFilterOptions || header.column.enabledColumnFilterOptions.includes(filterType.type) : (!enabledGlobalFilterOptions || enabledGlobalFilterOptions.includes(filterType.type)) && [MRT_FILTER_OPTION.BEST_MATCH_FIRST, MRT_FILTER_OPTION.BEST_MATCH].includes(filterType.type);
466
466
  });
467
467
  }, []);
468
468
 
469
469
  var handleSelectFilterType = function handleSelectFilterType(value) {
470
470
  if (header) {
471
- setCurrentFilterTypes(function (prev) {
471
+ setCurrentFilterFns(function (prev) {
472
472
  var _extends2;
473
473
 
474
474
  return _extends({}, prev, (_extends2 = {}, _extends2[header.id] = value, _extends2));
475
475
  });
476
476
 
477
- if ([MRT_FILTER_TYPE.EMPTY, MRT_FILTER_TYPE.NOT_EMPTY].includes(value)) {
477
+ if ([MRT_FILTER_OPTION.EMPTY, MRT_FILTER_OPTION.NOT_EMPTY].includes(value)) {
478
478
  header.column.setColumnFilterValue(' ');
479
479
  }
480
480
  } else {
481
- setCurrentGlobalFilterType(value);
481
+ setCurrentGlobalFilterFn(value);
482
482
  }
483
483
 
484
484
  setAnchorEl(null);
485
485
  onSelect == null ? void 0 : onSelect();
486
486
  };
487
487
 
488
- var filterType = !!header ? currentFilterTypes[header.id] : currentGlobalFilterType;
488
+ var filterType = !!header ? currentFilterFns[header.id] : currentGlobalFilterFn;
489
489
  return React__default.createElement(material.Menu, {
490
490
  anchorEl: anchorEl,
491
491
  anchorOrigin: {
@@ -499,7 +499,7 @@ var MRT_FilterTypeMenu = function MRT_FilterTypeMenu(_ref) {
499
499
  MenuListProps: {
500
500
  dense: isDensePadding
501
501
  }
502
- }, filterTypes.map(function (_ref2, index) {
502
+ }, filterOptions.map(function (_ref2, index) {
503
503
  var type = _ref2.type,
504
504
  label = _ref2.label,
505
505
  divider = _ref2.divider,
@@ -843,7 +843,7 @@ var MRT_ColumnActionMenu = function MRT_ColumnActionMenu(_ref) {
843
843
  sx: {
844
844
  p: 0
845
845
  }
846
- }, React__default.createElement(ArrowRightIcon, null))), React__default.createElement(MRT_FilterTypeMenu, {
846
+ }, React__default.createElement(ArrowRightIcon, null))), React__default.createElement(MRT_FilterOptionMenu, {
847
847
  anchorEl: filterMenuAnchorEl,
848
848
  header: header,
849
849
  key: 2,
@@ -1257,7 +1257,7 @@ var MRT_SearchTextField = function MRT_SearchTextField(_ref) {
1257
1257
  sx: _extends({
1258
1258
  justifySelf: 'end'
1259
1259
  }, textFieldProps == null ? void 0 : textFieldProps.sx)
1260
- })), React__default.createElement(MRT_FilterTypeMenu, {
1260
+ })), React__default.createElement(MRT_FilterOptionMenu, {
1261
1261
  anchorEl: anchorEl,
1262
1262
  setAnchorEl: setAnchorEl,
1263
1263
  tableInstance: tableInstance
@@ -1755,11 +1755,11 @@ var MRT_FilterTextField = function MRT_FilterTextField(_ref) {
1755
1755
  idPrefix = _tableInstance$option.idPrefix,
1756
1756
  localization = _tableInstance$option.localization,
1757
1757
  muiTableHeadCellFilterTextFieldProps = _tableInstance$option.muiTableHeadCellFilterTextFieldProps,
1758
- setCurrentFilterTypes = tableInstance.setCurrentFilterTypes;
1758
+ setCurrentFilterFns = tableInstance.setCurrentFilterFns;
1759
1759
  var column = header.column;
1760
1760
 
1761
1761
  var _getState = getState(),
1762
- currentFilterTypes = _getState.currentFilterTypes;
1762
+ currentFilterFns = _getState.currentFilterFns;
1763
1763
 
1764
1764
  var _useState = React.useState(null),
1765
1765
  anchorEl = _useState[0],
@@ -1798,10 +1798,10 @@ var MRT_FilterTextField = function MRT_FilterTextField(_ref) {
1798
1798
  var handleClearFilterChip = function handleClearFilterChip() {
1799
1799
  setFilterValue('');
1800
1800
  column.setColumnFilterValue(undefined);
1801
- setCurrentFilterTypes(function (prev) {
1801
+ setCurrentFilterFns(function (prev) {
1802
1802
  var _extends2;
1803
1803
 
1804
- return _extends({}, prev, (_extends2 = {}, _extends2[header.id] = MRT_FILTER_TYPE.BEST_MATCH, _extends2));
1804
+ return _extends({}, prev, (_extends2 = {}, _extends2[header.id] = MRT_FILTER_OPTION.BEST_MATCH, _extends2));
1805
1805
  });
1806
1806
  };
1807
1807
 
@@ -1813,10 +1813,10 @@ var MRT_FilterTextField = function MRT_FilterTextField(_ref) {
1813
1813
  }
1814
1814
 
1815
1815
  var filterId = "mrt-" + idPrefix + "-" + header.id + "-filter-text-field";
1816
- var filterType = currentFilterTypes == null ? void 0 : currentFilterTypes[header.id];
1816
+ var filterFn = currentFilterFns == null ? void 0 : currentFilterFns[header.id];
1817
1817
  var isSelectFilter = !!column.filterSelectOptions;
1818
- var filterChipLabel = !(filterType instanceof Function) && [MRT_FILTER_TYPE.EMPTY, MRT_FILTER_TYPE.NOT_EMPTY].includes(filterType) ? //@ts-ignore
1819
- localization["filter" + (filterType.charAt(0).toUpperCase() + filterType.slice(1))] : '';
1818
+ var filterChipLabel = !(filterFn instanceof Function) && [MRT_FILTER_OPTION.EMPTY, MRT_FILTER_OPTION.NOT_EMPTY].includes(filterFn) ? //@ts-ignore
1819
+ localization["filter" + (filterFn.charAt(0).toUpperCase() + filterFn.slice(1))] : '';
1820
1820
  var filterPlaceholder = (_localization$filterB = localization.filterByColumn) == null ? void 0 : _localization$filterB.replace('{column}', String(column.header));
1821
1821
  return React__default.createElement(React__default.Fragment, null, React__default.createElement(material.TextField, Object.assign({
1822
1822
  fullWidth: true,
@@ -1831,9 +1831,9 @@ var MRT_FilterTextField = function MRT_FilterTextField(_ref) {
1831
1831
  },
1832
1832
  helperText: React__default.createElement("label", {
1833
1833
  htmlFor: filterId
1834
- }, filterType instanceof Function ? (_localization$filterM = localization.filterMode.replace('{filterType}', // @ts-ignore
1835
- (_localization$ = localization["filter" + (filterType.name.charAt(0).toUpperCase() + filterType.name.slice(1))]) != null ? _localization$ : '')) != null ? _localization$filterM : '' : localization.filterMode.replace('{filterType}', // @ts-ignore
1836
- localization["filter" + (filterType.charAt(0).toUpperCase() + filterType.slice(1))])),
1834
+ }, filterFn instanceof Function ? (_localization$filterM = localization.filterMode.replace('{filterType}', // @ts-ignore
1835
+ (_localization$ = localization["filter" + (filterFn.name.charAt(0).toUpperCase() + filterFn.name.slice(1))]) != null ? _localization$ : '')) != null ? _localization$filterM : '' : localization.filterMode.replace('{filterType}', // @ts-ignore
1836
+ localization["filter" + (filterFn.charAt(0).toUpperCase() + filterFn.slice(1))])),
1837
1837
  FormHelperTextProps: {
1838
1838
  sx: {
1839
1839
  fontSize: '0.6rem',
@@ -1920,7 +1920,7 @@ var MRT_FilterTextField = function MRT_FilterTextField(_ref) {
1920
1920
  key: value,
1921
1921
  value: value
1922
1922
  }, text);
1923
- })), React__default.createElement(MRT_FilterTypeMenu, {
1923
+ })), React__default.createElement(MRT_FilterOptionMenu, {
1924
1924
  anchorEl: anchorEl,
1925
1925
  header: header,
1926
1926
  setAnchorEl: setAnchorEl,
@@ -2022,9 +2022,9 @@ var MRT_TableHeadCell = function MRT_TableHeadCell(_ref) {
2022
2022
  var tableCellProps = _extends({}, header.getHeaderProps(), mTableHeadCellProps, mcTableHeadCellProps);
2023
2023
 
2024
2024
  var sortTooltip = !!column.getIsSorted() ? column.getIsSorted() === 'desc' ? localization.sortedByColumnDesc.replace('{column}', column.header) : localization.sortedByColumnAsc.replace('{column}', column.header) : localization.unsorted;
2025
- var filterType = (_getState2 = getState()) == null ? void 0 : (_getState2$currentFil = _getState2.currentFilterTypes) == null ? void 0 : _getState2$currentFil[header.id];
2026
- var filterTooltip = !!column.getColumnFilterValue() ? localization.filteringByColumn.replace('{column}', String(column.header)).replace('{filterType}', filterType instanceof Function ? '' : // @ts-ignore
2027
- localization["filter" + (filterType.charAt(0).toUpperCase() + filterType.slice(1))]).replace('{filterValue}', column.getColumnFilterValue()).replace('" "', '') : localization.showHideFilters;
2025
+ var filterFn = (_getState2 = getState()) == null ? void 0 : (_getState2$currentFil = _getState2.currentFilterFns) == null ? void 0 : _getState2$currentFil[header.id];
2026
+ var filterTooltip = !!column.getColumnFilterValue() ? localization.filteringByColumn.replace('{column}', String(column.header)).replace('{filterType}', filterFn instanceof Function ? '' : // @ts-ignore
2027
+ localization["filter" + (filterFn.charAt(0).toUpperCase() + filterFn.slice(1))]).replace('{filterValue}', column.getColumnFilterValue()).replace('" "', '') : localization.showHideFilters;
2028
2028
  var headerElement = (_column$Header = column == null ? void 0 : column.Header == null ? void 0 : column.Header({
2029
2029
  header: header,
2030
2030
  tableInstance: tableInstance
@@ -2197,8 +2197,12 @@ var MRT_EditCellTextField = function MRT_EditCellTextField(_ref) {
2197
2197
  tableInstance = _ref.tableInstance;
2198
2198
  var getState = tableInstance.getState,
2199
2199
  _tableInstance$option = tableInstance.options,
2200
+ idPrefix = _tableInstance$option.idPrefix,
2200
2201
  enableEditing = _tableInstance$option.enableEditing,
2201
2202
  muiTableBodyCellEditTextFieldProps = _tableInstance$option.muiTableBodyCellEditTextFieldProps,
2203
+ onCellEditBlur = _tableInstance$option.onCellEditBlur,
2204
+ onCellEditChange = _tableInstance$option.onCellEditChange,
2205
+ setCurrentEditingCell = tableInstance.setCurrentEditingCell,
2202
2206
  setCurrentEditingRow = tableInstance.setCurrentEditingRow;
2203
2207
 
2204
2208
  var _useState = React.useState(cell.value),
@@ -2215,6 +2219,11 @@ var MRT_EditCellTextField = function MRT_EditCellTextField(_ref) {
2215
2219
  cell: cell,
2216
2220
  tableInstance: tableInstance
2217
2221
  });
2222
+ onCellEditChange == null ? void 0 : onCellEditChange({
2223
+ event: event,
2224
+ cell: cell,
2225
+ tableInstance: tableInstance
2226
+ });
2218
2227
  };
2219
2228
 
2220
2229
  var handleBlur = function handleBlur(event) {
@@ -2223,11 +2232,17 @@ var MRT_EditCellTextField = function MRT_EditCellTextField(_ref) {
2223
2232
  setCurrentEditingRow(_extends({}, getState().currentEditingRow));
2224
2233
  }
2225
2234
 
2235
+ setCurrentEditingCell(null);
2226
2236
  column.onCellEditBlur == null ? void 0 : column.onCellEditBlur({
2227
2237
  event: event,
2228
2238
  cell: cell,
2229
2239
  tableInstance: tableInstance
2230
2240
  });
2241
+ onCellEditBlur == null ? void 0 : onCellEditBlur({
2242
+ event: event,
2243
+ cell: cell,
2244
+ tableInstance: tableInstance
2245
+ });
2231
2246
  };
2232
2247
 
2233
2248
  var mTableBodyCellEditTextFieldProps = muiTableBodyCellEditTextFieldProps instanceof Function ? muiTableBodyCellEditTextFieldProps({
@@ -2249,6 +2264,7 @@ var MRT_EditCellTextField = function MRT_EditCellTextField(_ref) {
2249
2264
  }
2250
2265
 
2251
2266
  return React__default.createElement(material.TextField, Object.assign({
2267
+ id: "mrt-" + idPrefix + "-edit-cell-text-field-" + cell.id,
2252
2268
  margin: "dense",
2253
2269
  onBlur: handleBlur,
2254
2270
  onChange: handleChange,
@@ -2309,6 +2325,7 @@ var MRT_CopyButton = function MRT_CopyButton(_ref) {
2309
2325
  backgroundColor: 'transparent',
2310
2326
  border: 'none',
2311
2327
  color: 'inherit',
2328
+ cursor: 'copy',
2312
2329
  fontFamily: 'inherit',
2313
2330
  fontSize: 'inherit',
2314
2331
  letterSpacing: 'inherit',
@@ -2329,15 +2346,19 @@ var MRT_TableBodyCell = function MRT_TableBodyCell(_ref) {
2329
2346
  var getIsSomeColumnsPinned = tableInstance.getIsSomeColumnsPinned,
2330
2347
  getState = tableInstance.getState,
2331
2348
  _tableInstance$option = tableInstance.options,
2349
+ editingMode = _tableInstance$option.editingMode,
2332
2350
  enableClickToCopy = _tableInstance$option.enableClickToCopy,
2333
- enablePinning = _tableInstance$option.enablePinning,
2334
2351
  enableEditing = _tableInstance$option.enableEditing,
2352
+ enablePinning = _tableInstance$option.enablePinning,
2353
+ idPrefix = _tableInstance$option.idPrefix,
2335
2354
  isLoading = _tableInstance$option.isLoading,
2336
2355
  muiTableBodyCellProps = _tableInstance$option.muiTableBodyCellProps,
2337
2356
  muiTableBodyCellSkeletonProps = _tableInstance$option.muiTableBodyCellSkeletonProps,
2338
- onCellClick = _tableInstance$option.onCellClick;
2357
+ onCellClick = _tableInstance$option.onCellClick,
2358
+ setCurrentEditingCell = tableInstance.setCurrentEditingCell;
2339
2359
 
2340
2360
  var _getState = getState(),
2361
+ currentEditingCell = _getState.currentEditingCell,
2341
2362
  currentEditingRow = _getState.currentEditingRow,
2342
2363
  isDensePadding = _getState.isDensePadding;
2343
2364
 
@@ -2357,6 +2378,23 @@ var MRT_TableBodyCell = function MRT_TableBodyCell(_ref) {
2357
2378
  var skeletonWidth = React.useMemo(function () {
2358
2379
  return column.columnDefType === 'display' ? column.getWidth() / 2 : Math.random() * (column.getWidth() - column.getWidth() / 3) + column.getWidth() / 3;
2359
2380
  }, [column.columnDefType, column.getWidth()]);
2381
+ var isEditable = (enableEditing || column.enableEditing) && column.enableEditing !== false;
2382
+ var isEditing = isEditable && (editingMode === 'table' || (currentEditingRow == null ? void 0 : currentEditingRow.id) === row.id || (currentEditingCell == null ? void 0 : currentEditingCell.id) === cell.id);
2383
+
2384
+ var handleDoubleClick = function handleDoubleClick(_event) {
2385
+ if ((enableEditing || column.enableEditing) && column.enableEditing !== false && editingMode === 'cell') {
2386
+ setCurrentEditingCell(cell);
2387
+ setTimeout(function () {
2388
+ var textField = document.getElementById("mrt-" + idPrefix + "-edit-cell-text-field-" + cell.id);
2389
+
2390
+ if (textField) {
2391
+ textField.focus();
2392
+ textField.select();
2393
+ }
2394
+ }, 200);
2395
+ }
2396
+ };
2397
+
2360
2398
  return React__default.createElement(material.TableCell, Object.assign({
2361
2399
  onClick: function onClick(event) {
2362
2400
  return onCellClick == null ? void 0 : onCellClick({
@@ -2364,9 +2402,11 @@ var MRT_TableBodyCell = function MRT_TableBodyCell(_ref) {
2364
2402
  cell: cell,
2365
2403
  tableInstance: tableInstance
2366
2404
  });
2367
- }
2405
+ },
2406
+ onDoubleClick: handleDoubleClick
2368
2407
  }, tableCellProps, {
2369
2408
  sx: _extends({
2409
+ cursor: isEditable && editingMode === 'cell' ? 'pointer' : 'text',
2370
2410
  maxWidth: "min(" + column.getWidth() + "px, fit-content)",
2371
2411
  minWidth: "max(" + column.getWidth() + "px, " + column.minWidth + "px)",
2372
2412
  p: isDensePadding ? column.columnDefType === 'display' ? '0 0.5rem' : '0.5rem' : column.columnDefType === 'display' ? '0.5rem 0.75rem' : '1rem',
@@ -2382,7 +2422,7 @@ var MRT_TableBodyCell = function MRT_TableBodyCell(_ref) {
2382
2422
  }, muiTableBodyCellSkeletonProps)) : column.columnDefType === 'display' ? column.Cell == null ? void 0 : column.Cell({
2383
2423
  cell: cell,
2384
2424
  tableInstance: tableInstance
2385
- }) : cell.getIsPlaceholder() || row.getIsGrouped() && column.id !== row.groupingColumnId ? null : cell.getIsAggregated() ? cell.renderAggregatedCell() : enableEditing && column.enableEditing !== false && (currentEditingRow == null ? void 0 : currentEditingRow.id) === row.id ? React__default.createElement(MRT_EditCellTextField, {
2425
+ }) : cell.getIsPlaceholder() || row.getIsGrouped() && column.id !== row.groupingColumnId ? null : cell.getIsAggregated() ? cell.renderAggregatedCell() : isEditing ? React__default.createElement(MRT_EditCellTextField, {
2386
2426
  cell: cell,
2387
2427
  tableInstance: tableInstance
2388
2428
  }) : (enableClickToCopy || column.enableClickToCopy) && column.enableClickToCopy !== false ? React__default.createElement(React__default.Fragment, null, React__default.createElement(MRT_CopyButton, {
@@ -2818,19 +2858,19 @@ var getAllLeafColumnDefs = function getAllLeafColumnDefs(columns) {
2818
2858
  return !col.columns;
2819
2859
  });
2820
2860
  };
2821
- var createGroup = function createGroup(table, column, currentFilterTypes) {
2861
+ var createGroup = function createGroup(table, column, currentFilterFns) {
2822
2862
  var _column$columns;
2823
2863
 
2824
2864
  return table.createGroup(_extends({}, column, {
2825
2865
  columns: column == null ? void 0 : (_column$columns = column.columns) == null ? void 0 : _column$columns.map == null ? void 0 : _column$columns.map(function (col) {
2826
- return col.columns ? createGroup(table, col, currentFilterTypes) : createDataColumn(table, col, currentFilterTypes);
2866
+ return col.columns ? createGroup(table, col, currentFilterFns) : createDataColumn(table, col, currentFilterFns);
2827
2867
  })
2828
2868
  }));
2829
2869
  };
2830
- var createDataColumn = function createDataColumn(table, column, currentFilterTypes) {
2870
+ var createDataColumn = function createDataColumn(table, column, currentFilterFns) {
2831
2871
  return (// @ts-ignore
2832
2872
  table.createDataColumn(column.id, _extends({
2833
- filterFn: currentFilterTypes[column.id] instanceof Function ? currentFilterTypes[column.id] : defaultFilterFNs[currentFilterTypes[column.id]]
2873
+ filterFn: currentFilterFns[column.id] instanceof Function ? currentFilterFns[column.id] : defaultFilterFNs[currentFilterFns[column.id]]
2834
2874
  }, column))
2835
2875
  );
2836
2876
  };
@@ -2839,7 +2879,7 @@ var createDisplayColumn = function createDisplayColumn(table, column) {
2839
2879
  };
2840
2880
 
2841
2881
  var MRT_TableRoot = function MRT_TableRoot(props) {
2842
- var _props$initialState$i, _props$initialState, _props$initialState$i2, _props$initialState2, _props$initialState$s, _props$initialState3, _props$initialState$s2, _props$initialState4, _props$initialState$p, _props$initialState5, _props$initialState5$, _props$initialState$p2, _props$initialState6, _props$initialState6$, _props$initialState$p3, _props$initialState7, _props$initialState7$, _props$globalFilterTy;
2882
+ var _initialState$current, _initialState$current2, _initialState$isDense, _initialState$isFullS, _initialState$showFil, _initialState$showGlo, _initialState$paginat, _initialState$paginat2, _initialState$paginat3, _initialState$paginat4, _initialState$paginat5, _initialState$paginat6, _props$globalFilterFn;
2843
2883
 
2844
2884
  var _useState = React.useState(props.idPrefix),
2845
2885
  idPrefix = _useState[0],
@@ -2850,50 +2890,77 @@ var MRT_TableRoot = function MRT_TableRoot(props) {
2850
2890
 
2851
2891
  return setIdPrefix((_props$idPrefix = props.idPrefix) != null ? _props$idPrefix : Math.random().toString(36).substring(2, 9));
2852
2892
  }, [props.idPrefix]);
2893
+ var initialState = React.useMemo(function () {
2894
+ if (!props.enablePersistentState || !props.idPrefix) {
2895
+ return props.initialState;
2896
+ }
2853
2897
 
2854
- var _useState2 = React.useState(null),
2855
- currentEditingRow = _useState2[0],
2856
- setCurrentEditingRow = _useState2[1];
2898
+ if (typeof window === 'undefined') {
2899
+ {
2900
+ console.error('The MRT Persistent Table State feature is not supported if using SSR, but you can wrap your <MaterialReactTable /> in a MUI <NoSsr> tags to let it work');
2901
+ }
2857
2902
 
2858
- var _useState3 = React.useState((_props$initialState$i = (_props$initialState = props.initialState) == null ? void 0 : _props$initialState.isDensePadding) != null ? _props$initialState$i : false),
2859
- isDensePadding = _useState3[0],
2860
- setIsDensePadding = _useState3[1];
2903
+ return props.initialState;
2904
+ }
2861
2905
 
2862
- var _useState4 = React.useState((_props$initialState$i2 = (_props$initialState2 = props.initialState) == null ? void 0 : _props$initialState2.isFullScreen) != null ? _props$initialState$i2 : false),
2863
- isFullScreen = _useState4[0],
2864
- setIsFullScreen = _useState4[1];
2906
+ var storedState = props.persistentStateMode === 'localStorage' ? localStorage.getItem("mrt-" + idPrefix + "-table-state") : props.persistentStateMode === 'sessionStorage' ? sessionStorage.getItem("mrt-" + idPrefix + "-table-state") : '{}';
2865
2907
 
2866
- var _useState5 = React.useState((_props$initialState$s = (_props$initialState3 = props.initialState) == null ? void 0 : _props$initialState3.showFilters) != null ? _props$initialState$s : false),
2867
- showFilters = _useState5[0],
2868
- setShowFilters = _useState5[1];
2908
+ if (storedState) {
2909
+ var parsedState = JSON.parse(storedState);
2869
2910
 
2870
- var _useState6 = React.useState((_props$initialState$s2 = (_props$initialState4 = props.initialState) == null ? void 0 : _props$initialState4.showGlobalFilter) != null ? _props$initialState$s2 : false),
2871
- showGlobalFilter = _useState6[0],
2872
- setShowGlobalFilter = _useState6[1];
2911
+ if (parsedState) {
2912
+ return _extends({}, props.initialState, parsedState);
2913
+ }
2914
+ }
2873
2915
 
2874
- var _useState7 = React.useState({
2875
- pageIndex: (_props$initialState$p = (_props$initialState5 = props.initialState) == null ? void 0 : (_props$initialState5$ = _props$initialState5.pagination) == null ? void 0 : _props$initialState5$.pageIndex) != null ? _props$initialState$p : 0,
2876
- pageSize: (_props$initialState$p2 = (_props$initialState6 = props.initialState) == null ? void 0 : (_props$initialState6$ = _props$initialState6.pagination) == null ? void 0 : _props$initialState6$.pageSize) != null ? _props$initialState$p2 : 10,
2877
- pageCount: (_props$initialState$p3 = (_props$initialState7 = props.initialState) == null ? void 0 : (_props$initialState7$ = _props$initialState7.pagination) == null ? void 0 : _props$initialState7$.pageCount) != null ? _props$initialState$p3 : -1
2916
+ return props.initialState;
2917
+ }, []);
2918
+
2919
+ var _useState2 = React.useState((_initialState$current = initialState == null ? void 0 : initialState.currentEditingCell) != null ? _initialState$current : null),
2920
+ currentEditingCell = _useState2[0],
2921
+ setCurrentEditingCell = _useState2[1];
2922
+
2923
+ var _useState3 = React.useState((_initialState$current2 = initialState == null ? void 0 : initialState.currentEditingRow) != null ? _initialState$current2 : null),
2924
+ currentEditingRow = _useState3[0],
2925
+ setCurrentEditingRow = _useState3[1];
2926
+
2927
+ var _useState4 = React.useState((_initialState$isDense = initialState == null ? void 0 : initialState.isDensePadding) != null ? _initialState$isDense : false),
2928
+ isDensePadding = _useState4[0],
2929
+ setIsDensePadding = _useState4[1];
2930
+
2931
+ var _useState5 = React.useState((_initialState$isFullS = initialState == null ? void 0 : initialState.isFullScreen) != null ? _initialState$isFullS : false),
2932
+ isFullScreen = _useState5[0],
2933
+ setIsFullScreen = _useState5[1];
2934
+
2935
+ var _useState6 = React.useState((_initialState$showFil = initialState == null ? void 0 : initialState.showFilters) != null ? _initialState$showFil : false),
2936
+ showFilters = _useState6[0],
2937
+ setShowFilters = _useState6[1];
2938
+
2939
+ var _useState7 = React.useState((_initialState$showGlo = initialState == null ? void 0 : initialState.showGlobalFilter) != null ? _initialState$showGlo : false),
2940
+ showGlobalFilter = _useState7[0],
2941
+ setShowGlobalFilter = _useState7[1];
2942
+
2943
+ var _useState8 = React.useState({
2944
+ pageIndex: (_initialState$paginat = initialState == null ? void 0 : (_initialState$paginat2 = initialState.pagination) == null ? void 0 : _initialState$paginat2.pageIndex) != null ? _initialState$paginat : 0,
2945
+ pageSize: (_initialState$paginat3 = initialState == null ? void 0 : (_initialState$paginat4 = initialState.pagination) == null ? void 0 : _initialState$paginat4.pageSize) != null ? _initialState$paginat3 : 10,
2946
+ pageCount: (_initialState$paginat5 = initialState == null ? void 0 : (_initialState$paginat6 = initialState.pagination) == null ? void 0 : _initialState$paginat6.pageCount) != null ? _initialState$paginat5 : -1
2878
2947
  }),
2879
- pagination = _useState7[0],
2880
- setPagination = _useState7[1];
2948
+ pagination = _useState8[0],
2949
+ setPagination = _useState8[1];
2881
2950
 
2882
- var _useState8 = React.useState(function () {
2951
+ var _useState9 = React.useState(function () {
2883
2952
  return Object.assign.apply(Object, [{}].concat(getAllLeafColumnDefs(props.columns).map(function (c) {
2884
- var _ref, _c$filter, _props$initialState8, _props$initialState8$, _c$filterSelectOption, _ref2;
2953
+ var _ref, _c$filterFn, _initialState$current3, _c$filterSelectOption, _ref2;
2885
2954
 
2886
- return _ref2 = {}, _ref2[c.id] = (_ref = (_c$filter = c.filter) != null ? _c$filter : props == null ? void 0 : (_props$initialState8 = props.initialState) == null ? void 0 : (_props$initialState8$ = _props$initialState8.columnFilters) == null ? void 0 : _props$initialState8$.find(function (cf) {
2887
- return cf.id === c.id;
2888
- })) != null ? _ref : !!((_c$filterSelectOption = c.filterSelectOptions) != null && _c$filterSelectOption.length) ? MRT_FILTER_TYPE.EQUALS : MRT_FILTER_TYPE.BEST_MATCH, _ref2;
2955
+ return _ref2 = {}, _ref2[c.id] = (_ref = (_c$filterFn = c.filterFn) != null ? _c$filterFn : initialState == null ? void 0 : (_initialState$current3 = initialState.currentFilterFns) == null ? void 0 : _initialState$current3[c.id]) != null ? _ref : !!((_c$filterSelectOption = c.filterSelectOptions) != null && _c$filterSelectOption.length) ? MRT_FILTER_OPTION.EQUALS : MRT_FILTER_OPTION.BEST_MATCH, _ref2;
2889
2956
  })));
2890
2957
  }),
2891
- currentFilterTypes = _useState8[0],
2892
- setCurrentFilterTypes = _useState8[1];
2958
+ currentFilterFns = _useState9[0],
2959
+ setCurrentFilterFns = _useState9[1];
2893
2960
 
2894
- var _useState9 = React.useState((_props$globalFilterTy = props.globalFilterType) != null ? _props$globalFilterTy : MRT_FILTER_TYPE.BEST_MATCH_FIRST),
2895
- currentGlobalFilterType = _useState9[0],
2896
- setCurrentGlobalFilterType = _useState9[1];
2961
+ var _useState10 = React.useState((_props$globalFilterFn = props.globalFilterFn) != null ? _props$globalFilterFn : MRT_FILTER_OPTION.BEST_MATCH_FIRST),
2962
+ currentGlobalFilterFn = _useState10[0],
2963
+ setCurrentGlobalFilterFn = _useState10[1];
2897
2964
 
2898
2965
  var table = React.useMemo(function () {
2899
2966
  return reactTable.createTable();
@@ -2901,7 +2968,7 @@ var MRT_TableRoot = function MRT_TableRoot(props) {
2901
2968
  var displayColumns = React.useMemo(function () {
2902
2969
  var _props$localization, _props$localization2, _props$localization3, _props$localization5;
2903
2970
 
2904
- return [(props.enableRowActions || props.enableEditing) && createDisplayColumn(table, {
2971
+ return [(props.enableRowActions || props.enableEditing && props.editingMode === 'row') && createDisplayColumn(table, {
2905
2972
  Cell: function Cell(_ref3) {
2906
2973
  var cell = _ref3.cell;
2907
2974
  return React__default.createElement(MRT_ToggleRowActionMenuButton, {
@@ -2964,12 +3031,12 @@ var MRT_TableRoot = function MRT_TableRoot(props) {
2964
3031
  width: 40,
2965
3032
  minWidth: 40
2966
3033
  })].filter(Boolean);
2967
- }, [props.enableEditing, props.enableExpandAll, props.enableExpanded, props.enableGrouping, props.enableRowActions, props.enableRowNumbers, props.enableRowSelection, props.enableSelectAll, props.localization, table]);
3034
+ }, [props.editingMode, props.enableEditing, props.enableExpandAll, props.enableExpanded, props.enableGrouping, props.enableRowActions, props.enableRowNumbers, props.enableRowSelection, props.enableSelectAll, props.localization, table]);
2968
3035
  var columns = React.useMemo(function () {
2969
3036
  return table.createColumns([].concat(displayColumns, props.columns.map(function (column) {
2970
- return column.columns ? createGroup(table, column, currentFilterTypes) : createDataColumn(table, column, currentFilterTypes);
3037
+ return column.columns ? createGroup(table, column, currentFilterFns) : createDataColumn(table, column, currentFilterFns);
2971
3038
  })));
2972
- }, [table, props.columns, currentFilterTypes]);
3039
+ }, [table, props.columns, currentFilterFns]);
2973
3040
  var data = React.useMemo(function () {
2974
3041
  return props.isLoading && !props.data.length ? [].concat(Array(10).fill(null)).map(function () {
2975
3042
  return Object.assign.apply(Object, [{}].concat(getAllLeafColumnDefs(props.columns).map(function (c) {
@@ -2982,7 +3049,7 @@ var MRT_TableRoot = function MRT_TableRoot(props) {
2982
3049
 
2983
3050
  var tableInstance = _extends({}, reactTable.useTableInstance(table, _extends({
2984
3051
  //@ts-ignore
2985
- filterTypes: defaultFilterFNs,
3052
+ filterFns: defaultFilterFNs,
2986
3053
  getColumnFilteredRowModel: reactTable.getColumnFilteredRowModelSync(),
2987
3054
  getCoreRowModel: reactTable.getCoreRowModelSync(),
2988
3055
  getExpandedRowModel: reactTable.getExpandedRowModel(),
@@ -2993,8 +3060,7 @@ var MRT_TableRoot = function MRT_TableRoot(props) {
2993
3060
  getSubRows: function getSubRows(originalRow) {
2994
3061
  return originalRow.subRows;
2995
3062
  },
2996
- globalFilterType: currentGlobalFilterType,
2997
- idPrefix: idPrefix,
3063
+ globalFilterFn: currentGlobalFilterFn,
2998
3064
  onPaginationChange: function onPaginationChange(updater) {
2999
3065
  return setPagination(function (old) {
3000
3066
  return reactTable.functionalUpdate(updater, old);
@@ -3003,10 +3069,14 @@ var MRT_TableRoot = function MRT_TableRoot(props) {
3003
3069
  }, props, {
3004
3070
  columns: columns,
3005
3071
  data: data,
3072
+ idPrefix: idPrefix,
3073
+ //@ts-ignore
3074
+ initialState: initialState,
3006
3075
  state: _extends({
3076
+ currentEditingCell: currentEditingCell,
3007
3077
  currentEditingRow: currentEditingRow,
3008
- currentFilterTypes: currentFilterTypes,
3009
- currentGlobalFilterType: currentGlobalFilterType,
3078
+ currentFilterFns: currentFilterFns,
3079
+ currentGlobalFilterFn: currentGlobalFilterFn,
3010
3080
  isDensePadding: isDensePadding,
3011
3081
  isFullScreen: isFullScreen,
3012
3082
  //@ts-ignore
@@ -3015,39 +3085,69 @@ var MRT_TableRoot = function MRT_TableRoot(props) {
3015
3085
  showGlobalFilter: showGlobalFilter
3016
3086
  }, props.state)
3017
3087
  })), {
3088
+ //@ts-ignore
3089
+ setCurrentEditingCell: setCurrentEditingCell,
3090
+ //@ts-ignore
3018
3091
  setCurrentEditingRow: setCurrentEditingRow,
3019
- setCurrentFilterTypes: setCurrentFilterTypes,
3020
- setCurrentGlobalFilterType: setCurrentGlobalFilterType,
3092
+ setCurrentFilterFns: setCurrentFilterFns,
3093
+ //@ts-ignore
3094
+ setCurrentGlobalFilterFn: setCurrentGlobalFilterFn,
3021
3095
  setIsDensePadding: setIsDensePadding,
3022
3096
  setIsFullScreen: setIsFullScreen,
3023
3097
  setShowFilters: setShowFilters,
3024
3098
  setShowGlobalFilter: setShowGlobalFilter
3025
3099
  });
3026
3100
 
3101
+ React.useEffect(function () {
3102
+ if (typeof window === 'undefined' || !props.enablePersistentState) {
3103
+ return;
3104
+ }
3105
+
3106
+ if (!props.idPrefix && "development" !== 'production') {
3107
+ console.warn('a unique idPrefix prop is required for persistent table state to work');
3108
+ return;
3109
+ }
3110
+
3111
+ var itemArgs = ["mrt-" + idPrefix + "-table-state", JSON.stringify(tableInstance.getState())];
3112
+
3113
+ if (props.persistentStateMode === 'localStorage') {
3114
+ var _localStorage;
3115
+
3116
+ (_localStorage = localStorage).setItem.apply(_localStorage, itemArgs);
3117
+ } else if (props.persistentStateMode === 'sessionStorage') {
3118
+ var _sessionStorage;
3119
+
3120
+ (_sessionStorage = sessionStorage).setItem.apply(_sessionStorage, itemArgs);
3121
+ }
3122
+ }, [props.enablePersistentState, props.idPrefix, props.persistentStateMode, tableInstance]);
3027
3123
  return React__default.createElement(React__default.Fragment, null, React__default.createElement(material.Dialog, {
3028
- TransitionComponent: material.Grow,
3029
3124
  PaperComponent: material.Box,
3125
+ TransitionComponent: material.Grow,
3030
3126
  disablePortal: true,
3031
3127
  fullScreen: true,
3032
3128
  keepMounted: false,
3033
3129
  onClose: function onClose() {
3034
- return tableInstance.setIsFullScreen(false);
3130
+ return setIsFullScreen(false);
3035
3131
  },
3036
- open: tableInstance.getState().isFullScreen,
3132
+ open: isFullScreen,
3037
3133
  transitionDuration: 400
3038
3134
  }, React__default.createElement(MRT_TablePaper, {
3039
3135
  tableInstance: tableInstance
3040
- })), !tableInstance.getState().isFullScreen && React__default.createElement(MRT_TablePaper, {
3136
+ })), !isFullScreen && React__default.createElement(MRT_TablePaper, {
3041
3137
  tableInstance: tableInstance
3042
3138
  }));
3043
3139
  };
3044
3140
 
3045
- var _excluded$5 = ["autoResetExpanded", "columnResizeMode", "enableColumnActions", "enableColumnFilters", "enableColumnResizing", "enableDensePaddingToggle", "enableExpandAll", "enableFilters", "enableFullScreenToggle", "enableGlobalFilter", "enableHiding", "enableMultiRowSelection", "enablePagination", "enableSelectAll", "enableSorting", "enableStickyHeader", "enableTableFooter", "enableTableHead", "enableToolbarBottom", "enableToolbarInternalActions", "enableToolbarTop", "icons", "localization", "positionActionsColumn", "positionPagination", "positionToolbarActions", "positionToolbarAlertBanner"];
3141
+ var _excluded$5 = ["autoResetExpanded", "autoResetSorting", "columnResizeMode", "editingMode", "enableColumnActions", "enableColumnFilters", "enableColumnResizing", "enableDensePaddingToggle", "enableExpandAll", "enableFilters", "enableFullScreenToggle", "enableGlobalFilter", "enableHiding", "enableMultiRowSelection", "enablePagination", "enableSelectAll", "enableSorting", "enableStickyHeader", "enableTableFooter", "enableTableHead", "enableToolbarBottom", "enableToolbarInternalActions", "enableToolbarTop", "icons", "localization", "persistentStateMode", "positionActionsColumn", "positionPagination", "positionToolbarActions", "positionToolbarAlertBanner"];
3046
3142
  var MaterialReactTable = (function (_ref) {
3047
3143
  var _ref$autoResetExpande = _ref.autoResetExpanded,
3048
3144
  autoResetExpanded = _ref$autoResetExpande === void 0 ? false : _ref$autoResetExpande,
3145
+ _ref$autoResetSorting = _ref.autoResetSorting,
3146
+ autoResetSorting = _ref$autoResetSorting === void 0 ? false : _ref$autoResetSorting,
3049
3147
  _ref$columnResizeMode = _ref.columnResizeMode,
3050
3148
  columnResizeMode = _ref$columnResizeMode === void 0 ? 'onEnd' : _ref$columnResizeMode,
3149
+ _ref$editingMode = _ref.editingMode,
3150
+ editingMode = _ref$editingMode === void 0 ? 'row' : _ref$editingMode,
3051
3151
  _ref$enableColumnActi = _ref.enableColumnActions,
3052
3152
  enableColumnActions = _ref$enableColumnActi === void 0 ? true : _ref$enableColumnActi,
3053
3153
  _ref$enableColumnFilt = _ref.enableColumnFilters,
@@ -3088,6 +3188,8 @@ var MaterialReactTable = (function (_ref) {
3088
3188
  enableToolbarTop = _ref$enableToolbarTop === void 0 ? true : _ref$enableToolbarTop,
3089
3189
  icons = _ref.icons,
3090
3190
  localization = _ref.localization,
3191
+ _ref$persistentStateM = _ref.persistentStateMode,
3192
+ persistentStateMode = _ref$persistentStateM === void 0 ? 'sessionStorage' : _ref$persistentStateM,
3091
3193
  _ref$positionActionsC = _ref.positionActionsColumn,
3092
3194
  positionActionsColumn = _ref$positionActionsC === void 0 ? 'first' : _ref$positionActionsC,
3093
3195
  _ref$positionPaginati = _ref.positionPagination,
@@ -3100,7 +3202,9 @@ var MaterialReactTable = (function (_ref) {
3100
3202
 
3101
3203
  return React__default.createElement(MRT_TableRoot, Object.assign({
3102
3204
  autoResetExpanded: autoResetExpanded,
3205
+ autoResetSorting: autoResetSorting,
3103
3206
  columnResizeMode: columnResizeMode,
3207
+ editingMode: editingMode,
3104
3208
  enableColumnActions: enableColumnActions,
3105
3209
  enableColumnResizing: enableColumnResizing,
3106
3210
  enableColumnFilters: enableColumnFilters,
@@ -3122,6 +3226,7 @@ var MaterialReactTable = (function (_ref) {
3122
3226
  enableToolbarTop: enableToolbarTop,
3123
3227
  icons: _extends({}, MRT_Default_Icons, icons),
3124
3228
  localization: _extends({}, MRT_DefaultLocalization_EN, localization),
3229
+ persistentStateMode: persistentStateMode,
3125
3230
  positionActionsColumn: positionActionsColumn,
3126
3231
  positionPagination: positionPagination,
3127
3232
  positionToolbarActions: positionToolbarActions,