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.
@@ -228,21 +228,21 @@ var MRT_ExpandButton = function MRT_ExpandButton(_ref) {
228
228
  }));
229
229
  };
230
230
 
231
- var MRT_FILTER_TYPE;
232
-
233
- (function (MRT_FILTER_TYPE) {
234
- MRT_FILTER_TYPE["BEST_MATCH"] = "bestMatch";
235
- MRT_FILTER_TYPE["BEST_MATCH_FIRST"] = "bestMatchFirst";
236
- MRT_FILTER_TYPE["CONTAINS"] = "contains";
237
- MRT_FILTER_TYPE["EMPTY"] = "empty";
238
- MRT_FILTER_TYPE["ENDS_WITH"] = "endsWith";
239
- MRT_FILTER_TYPE["EQUALS"] = "equals";
240
- MRT_FILTER_TYPE["GREATER_THAN"] = "greaterThan";
241
- MRT_FILTER_TYPE["LESS_THAN"] = "lessThan";
242
- MRT_FILTER_TYPE["NOT_EMPTY"] = "notEmpty";
243
- MRT_FILTER_TYPE["NOT_EQUALS"] = "notEquals";
244
- MRT_FILTER_TYPE["STARTS_WITH"] = "startsWith";
245
- })(MRT_FILTER_TYPE || (MRT_FILTER_TYPE = {}));
231
+ var MRT_FILTER_OPTION;
232
+
233
+ (function (MRT_FILTER_OPTION) {
234
+ MRT_FILTER_OPTION["BEST_MATCH"] = "bestMatch";
235
+ MRT_FILTER_OPTION["BEST_MATCH_FIRST"] = "bestMatchFirst";
236
+ MRT_FILTER_OPTION["CONTAINS"] = "contains";
237
+ MRT_FILTER_OPTION["EMPTY"] = "empty";
238
+ MRT_FILTER_OPTION["ENDS_WITH"] = "endsWith";
239
+ MRT_FILTER_OPTION["EQUALS"] = "equals";
240
+ MRT_FILTER_OPTION["GREATER_THAN"] = "greaterThan";
241
+ MRT_FILTER_OPTION["LESS_THAN"] = "lessThan";
242
+ MRT_FILTER_OPTION["NOT_EMPTY"] = "notEmpty";
243
+ MRT_FILTER_OPTION["NOT_EQUALS"] = "notEquals";
244
+ MRT_FILTER_OPTION["STARTS_WITH"] = "startsWith";
245
+ })(MRT_FILTER_OPTION || (MRT_FILTER_OPTION = {}));
246
246
 
247
247
  var bestMatchFirst = function bestMatchFirst(rows, columnIds, filterValue) {
248
248
  return matchSorter(rows, filterValue.toString().trim(), {
@@ -380,7 +380,7 @@ var commonMenuItemStyles = {
380
380
  my: 0,
381
381
  alignItems: 'center'
382
382
  };
383
- var MRT_FilterTypeMenu = function MRT_FilterTypeMenu(_ref) {
383
+ var MRT_FilterOptionMenu = function MRT_FilterOptionMenu(_ref) {
384
384
  var anchorEl = _ref.anchorEl,
385
385
  header = _ref.header,
386
386
  onSelect = _ref.onSelect,
@@ -388,97 +388,97 @@ var MRT_FilterTypeMenu = function MRT_FilterTypeMenu(_ref) {
388
388
  tableInstance = _ref.tableInstance;
389
389
  var getState = tableInstance.getState,
390
390
  _tableInstance$option = tableInstance.options,
391
- enabledGlobalFilterTypes = _tableInstance$option.enabledGlobalFilterTypes,
391
+ enabledGlobalFilterOptions = _tableInstance$option.enabledGlobalFilterOptions,
392
392
  localization = _tableInstance$option.localization,
393
- setCurrentFilterTypes = tableInstance.setCurrentFilterTypes,
394
- setCurrentGlobalFilterType = tableInstance.setCurrentGlobalFilterType;
393
+ setCurrentFilterFns = tableInstance.setCurrentFilterFns,
394
+ setCurrentGlobalFilterFn = tableInstance.setCurrentGlobalFilterFn;
395
395
 
396
396
  var _getState = getState(),
397
397
  isDensePadding = _getState.isDensePadding,
398
- currentFilterTypes = _getState.currentFilterTypes,
399
- currentGlobalFilterType = _getState.currentGlobalFilterType;
398
+ currentFilterFns = _getState.currentFilterFns,
399
+ currentGlobalFilterFn = _getState.currentGlobalFilterFn;
400
400
 
401
- var filterTypes = useMemo(function () {
401
+ var filterOptions = useMemo(function () {
402
402
  return [{
403
- type: MRT_FILTER_TYPE.BEST_MATCH_FIRST,
403
+ type: MRT_FILTER_OPTION.BEST_MATCH_FIRST,
404
404
  label: localization.filterBestMatchFirst,
405
405
  divider: false,
406
406
  fn: bestMatchFirst
407
407
  }, {
408
- type: MRT_FILTER_TYPE.BEST_MATCH,
408
+ type: MRT_FILTER_OPTION.BEST_MATCH,
409
409
  label: localization.filterBestMatch,
410
410
  divider: !!header,
411
411
  fn: bestMatch
412
412
  }, {
413
- type: MRT_FILTER_TYPE.CONTAINS,
413
+ type: MRT_FILTER_OPTION.CONTAINS,
414
414
  label: localization.filterContains,
415
415
  divider: false,
416
416
  fn: contains
417
417
  }, {
418
- type: MRT_FILTER_TYPE.STARTS_WITH,
418
+ type: MRT_FILTER_OPTION.STARTS_WITH,
419
419
  label: localization.filterStartsWith,
420
420
  divider: false,
421
421
  fn: startsWith
422
422
  }, {
423
- type: MRT_FILTER_TYPE.ENDS_WITH,
423
+ type: MRT_FILTER_OPTION.ENDS_WITH,
424
424
  label: localization.filterEndsWith,
425
425
  divider: true,
426
426
  fn: endsWith
427
427
  }, {
428
- type: MRT_FILTER_TYPE.EQUALS,
428
+ type: MRT_FILTER_OPTION.EQUALS,
429
429
  label: localization.filterEquals,
430
430
  divider: false,
431
431
  fn: equals
432
432
  }, {
433
- type: MRT_FILTER_TYPE.NOT_EQUALS,
433
+ type: MRT_FILTER_OPTION.NOT_EQUALS,
434
434
  label: localization.filterNotEquals,
435
435
  divider: true,
436
436
  fn: notEquals
437
437
  }, {
438
- type: MRT_FILTER_TYPE.GREATER_THAN,
438
+ type: MRT_FILTER_OPTION.GREATER_THAN,
439
439
  label: localization.filterGreaterThan,
440
440
  divider: false,
441
441
  fn: greaterThan
442
442
  }, {
443
- type: MRT_FILTER_TYPE.LESS_THAN,
443
+ type: MRT_FILTER_OPTION.LESS_THAN,
444
444
  label: localization.filterLessThan,
445
445
  divider: true,
446
446
  fn: lessThan
447
447
  }, {
448
- type: MRT_FILTER_TYPE.EMPTY,
448
+ type: MRT_FILTER_OPTION.EMPTY,
449
449
  label: localization.filterEmpty,
450
450
  divider: false,
451
451
  fn: empty
452
452
  }, {
453
- type: MRT_FILTER_TYPE.NOT_EMPTY,
453
+ type: MRT_FILTER_OPTION.NOT_EMPTY,
454
454
  label: localization.filterNotEmpty,
455
455
  divider: false,
456
456
  fn: notEmpty
457
457
  }].filter(function (filterType) {
458
- 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);
458
+ 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);
459
459
  });
460
460
  }, []);
461
461
 
462
462
  var handleSelectFilterType = function handleSelectFilterType(value) {
463
463
  if (header) {
464
- setCurrentFilterTypes(function (prev) {
464
+ setCurrentFilterFns(function (prev) {
465
465
  var _extends2;
466
466
 
467
467
  return _extends({}, prev, (_extends2 = {}, _extends2[header.id] = value, _extends2));
468
468
  });
469
469
 
470
- if ([MRT_FILTER_TYPE.EMPTY, MRT_FILTER_TYPE.NOT_EMPTY].includes(value)) {
470
+ if ([MRT_FILTER_OPTION.EMPTY, MRT_FILTER_OPTION.NOT_EMPTY].includes(value)) {
471
471
  header.column.setColumnFilterValue(' ');
472
472
  }
473
473
  } else {
474
- setCurrentGlobalFilterType(value);
474
+ setCurrentGlobalFilterFn(value);
475
475
  }
476
476
 
477
477
  setAnchorEl(null);
478
478
  onSelect == null ? void 0 : onSelect();
479
479
  };
480
480
 
481
- var filterType = !!header ? currentFilterTypes[header.id] : currentGlobalFilterType;
481
+ var filterType = !!header ? currentFilterFns[header.id] : currentGlobalFilterFn;
482
482
  return React.createElement(Menu, {
483
483
  anchorEl: anchorEl,
484
484
  anchorOrigin: {
@@ -492,7 +492,7 @@ var MRT_FilterTypeMenu = function MRT_FilterTypeMenu(_ref) {
492
492
  MenuListProps: {
493
493
  dense: isDensePadding
494
494
  }
495
- }, filterTypes.map(function (_ref2, index) {
495
+ }, filterOptions.map(function (_ref2, index) {
496
496
  var type = _ref2.type,
497
497
  label = _ref2.label,
498
498
  divider = _ref2.divider,
@@ -836,7 +836,7 @@ var MRT_ColumnActionMenu = function MRT_ColumnActionMenu(_ref) {
836
836
  sx: {
837
837
  p: 0
838
838
  }
839
- }, React.createElement(ArrowRightIcon, null))), React.createElement(MRT_FilterTypeMenu, {
839
+ }, React.createElement(ArrowRightIcon, null))), React.createElement(MRT_FilterOptionMenu, {
840
840
  anchorEl: filterMenuAnchorEl,
841
841
  header: header,
842
842
  key: 2,
@@ -1250,7 +1250,7 @@ var MRT_SearchTextField = function MRT_SearchTextField(_ref) {
1250
1250
  sx: _extends({
1251
1251
  justifySelf: 'end'
1252
1252
  }, textFieldProps == null ? void 0 : textFieldProps.sx)
1253
- })), React.createElement(MRT_FilterTypeMenu, {
1253
+ })), React.createElement(MRT_FilterOptionMenu, {
1254
1254
  anchorEl: anchorEl,
1255
1255
  setAnchorEl: setAnchorEl,
1256
1256
  tableInstance: tableInstance
@@ -1748,11 +1748,11 @@ var MRT_FilterTextField = function MRT_FilterTextField(_ref) {
1748
1748
  idPrefix = _tableInstance$option.idPrefix,
1749
1749
  localization = _tableInstance$option.localization,
1750
1750
  muiTableHeadCellFilterTextFieldProps = _tableInstance$option.muiTableHeadCellFilterTextFieldProps,
1751
- setCurrentFilterTypes = tableInstance.setCurrentFilterTypes;
1751
+ setCurrentFilterFns = tableInstance.setCurrentFilterFns;
1752
1752
  var column = header.column;
1753
1753
 
1754
1754
  var _getState = getState(),
1755
- currentFilterTypes = _getState.currentFilterTypes;
1755
+ currentFilterFns = _getState.currentFilterFns;
1756
1756
 
1757
1757
  var _useState = useState(null),
1758
1758
  anchorEl = _useState[0],
@@ -1791,10 +1791,10 @@ var MRT_FilterTextField = function MRT_FilterTextField(_ref) {
1791
1791
  var handleClearFilterChip = function handleClearFilterChip() {
1792
1792
  setFilterValue('');
1793
1793
  column.setColumnFilterValue(undefined);
1794
- setCurrentFilterTypes(function (prev) {
1794
+ setCurrentFilterFns(function (prev) {
1795
1795
  var _extends2;
1796
1796
 
1797
- return _extends({}, prev, (_extends2 = {}, _extends2[header.id] = MRT_FILTER_TYPE.BEST_MATCH, _extends2));
1797
+ return _extends({}, prev, (_extends2 = {}, _extends2[header.id] = MRT_FILTER_OPTION.BEST_MATCH, _extends2));
1798
1798
  });
1799
1799
  };
1800
1800
 
@@ -1806,10 +1806,10 @@ var MRT_FilterTextField = function MRT_FilterTextField(_ref) {
1806
1806
  }
1807
1807
 
1808
1808
  var filterId = "mrt-" + idPrefix + "-" + header.id + "-filter-text-field";
1809
- var filterType = currentFilterTypes == null ? void 0 : currentFilterTypes[header.id];
1809
+ var filterFn = currentFilterFns == null ? void 0 : currentFilterFns[header.id];
1810
1810
  var isSelectFilter = !!column.filterSelectOptions;
1811
- var filterChipLabel = !(filterType instanceof Function) && [MRT_FILTER_TYPE.EMPTY, MRT_FILTER_TYPE.NOT_EMPTY].includes(filterType) ? //@ts-ignore
1812
- localization["filter" + (filterType.charAt(0).toUpperCase() + filterType.slice(1))] : '';
1811
+ var filterChipLabel = !(filterFn instanceof Function) && [MRT_FILTER_OPTION.EMPTY, MRT_FILTER_OPTION.NOT_EMPTY].includes(filterFn) ? //@ts-ignore
1812
+ localization["filter" + (filterFn.charAt(0).toUpperCase() + filterFn.slice(1))] : '';
1813
1813
  var filterPlaceholder = (_localization$filterB = localization.filterByColumn) == null ? void 0 : _localization$filterB.replace('{column}', String(column.header));
1814
1814
  return React.createElement(React.Fragment, null, React.createElement(TextField, Object.assign({
1815
1815
  fullWidth: true,
@@ -1824,9 +1824,9 @@ var MRT_FilterTextField = function MRT_FilterTextField(_ref) {
1824
1824
  },
1825
1825
  helperText: React.createElement("label", {
1826
1826
  htmlFor: filterId
1827
- }, filterType instanceof Function ? (_localization$filterM = localization.filterMode.replace('{filterType}', // @ts-ignore
1828
- (_localization$ = localization["filter" + (filterType.name.charAt(0).toUpperCase() + filterType.name.slice(1))]) != null ? _localization$ : '')) != null ? _localization$filterM : '' : localization.filterMode.replace('{filterType}', // @ts-ignore
1829
- localization["filter" + (filterType.charAt(0).toUpperCase() + filterType.slice(1))])),
1827
+ }, filterFn instanceof Function ? (_localization$filterM = localization.filterMode.replace('{filterType}', // @ts-ignore
1828
+ (_localization$ = localization["filter" + (filterFn.name.charAt(0).toUpperCase() + filterFn.name.slice(1))]) != null ? _localization$ : '')) != null ? _localization$filterM : '' : localization.filterMode.replace('{filterType}', // @ts-ignore
1829
+ localization["filter" + (filterFn.charAt(0).toUpperCase() + filterFn.slice(1))])),
1830
1830
  FormHelperTextProps: {
1831
1831
  sx: {
1832
1832
  fontSize: '0.6rem',
@@ -1913,7 +1913,7 @@ var MRT_FilterTextField = function MRT_FilterTextField(_ref) {
1913
1913
  key: value,
1914
1914
  value: value
1915
1915
  }, text);
1916
- })), React.createElement(MRT_FilterTypeMenu, {
1916
+ })), React.createElement(MRT_FilterOptionMenu, {
1917
1917
  anchorEl: anchorEl,
1918
1918
  header: header,
1919
1919
  setAnchorEl: setAnchorEl,
@@ -2015,9 +2015,9 @@ var MRT_TableHeadCell = function MRT_TableHeadCell(_ref) {
2015
2015
  var tableCellProps = _extends({}, header.getHeaderProps(), mTableHeadCellProps, mcTableHeadCellProps);
2016
2016
 
2017
2017
  var sortTooltip = !!column.getIsSorted() ? column.getIsSorted() === 'desc' ? localization.sortedByColumnDesc.replace('{column}', column.header) : localization.sortedByColumnAsc.replace('{column}', column.header) : localization.unsorted;
2018
- var filterType = (_getState2 = getState()) == null ? void 0 : (_getState2$currentFil = _getState2.currentFilterTypes) == null ? void 0 : _getState2$currentFil[header.id];
2019
- var filterTooltip = !!column.getColumnFilterValue() ? localization.filteringByColumn.replace('{column}', String(column.header)).replace('{filterType}', filterType instanceof Function ? '' : // @ts-ignore
2020
- localization["filter" + (filterType.charAt(0).toUpperCase() + filterType.slice(1))]).replace('{filterValue}', column.getColumnFilterValue()).replace('" "', '') : localization.showHideFilters;
2018
+ var filterFn = (_getState2 = getState()) == null ? void 0 : (_getState2$currentFil = _getState2.currentFilterFns) == null ? void 0 : _getState2$currentFil[header.id];
2019
+ var filterTooltip = !!column.getColumnFilterValue() ? localization.filteringByColumn.replace('{column}', String(column.header)).replace('{filterType}', filterFn instanceof Function ? '' : // @ts-ignore
2020
+ localization["filter" + (filterFn.charAt(0).toUpperCase() + filterFn.slice(1))]).replace('{filterValue}', column.getColumnFilterValue()).replace('" "', '') : localization.showHideFilters;
2021
2021
  var headerElement = (_column$Header = column == null ? void 0 : column.Header == null ? void 0 : column.Header({
2022
2022
  header: header,
2023
2023
  tableInstance: tableInstance
@@ -2190,8 +2190,12 @@ var MRT_EditCellTextField = function MRT_EditCellTextField(_ref) {
2190
2190
  tableInstance = _ref.tableInstance;
2191
2191
  var getState = tableInstance.getState,
2192
2192
  _tableInstance$option = tableInstance.options,
2193
+ idPrefix = _tableInstance$option.idPrefix,
2193
2194
  enableEditing = _tableInstance$option.enableEditing,
2194
2195
  muiTableBodyCellEditTextFieldProps = _tableInstance$option.muiTableBodyCellEditTextFieldProps,
2196
+ onCellEditBlur = _tableInstance$option.onCellEditBlur,
2197
+ onCellEditChange = _tableInstance$option.onCellEditChange,
2198
+ setCurrentEditingCell = tableInstance.setCurrentEditingCell,
2195
2199
  setCurrentEditingRow = tableInstance.setCurrentEditingRow;
2196
2200
 
2197
2201
  var _useState = useState(cell.value),
@@ -2208,6 +2212,11 @@ var MRT_EditCellTextField = function MRT_EditCellTextField(_ref) {
2208
2212
  cell: cell,
2209
2213
  tableInstance: tableInstance
2210
2214
  });
2215
+ onCellEditChange == null ? void 0 : onCellEditChange({
2216
+ event: event,
2217
+ cell: cell,
2218
+ tableInstance: tableInstance
2219
+ });
2211
2220
  };
2212
2221
 
2213
2222
  var handleBlur = function handleBlur(event) {
@@ -2216,11 +2225,17 @@ var MRT_EditCellTextField = function MRT_EditCellTextField(_ref) {
2216
2225
  setCurrentEditingRow(_extends({}, getState().currentEditingRow));
2217
2226
  }
2218
2227
 
2228
+ setCurrentEditingCell(null);
2219
2229
  column.onCellEditBlur == null ? void 0 : column.onCellEditBlur({
2220
2230
  event: event,
2221
2231
  cell: cell,
2222
2232
  tableInstance: tableInstance
2223
2233
  });
2234
+ onCellEditBlur == null ? void 0 : onCellEditBlur({
2235
+ event: event,
2236
+ cell: cell,
2237
+ tableInstance: tableInstance
2238
+ });
2224
2239
  };
2225
2240
 
2226
2241
  var mTableBodyCellEditTextFieldProps = muiTableBodyCellEditTextFieldProps instanceof Function ? muiTableBodyCellEditTextFieldProps({
@@ -2242,6 +2257,7 @@ var MRT_EditCellTextField = function MRT_EditCellTextField(_ref) {
2242
2257
  }
2243
2258
 
2244
2259
  return React.createElement(TextField, Object.assign({
2260
+ id: "mrt-" + idPrefix + "-edit-cell-text-field-" + cell.id,
2245
2261
  margin: "dense",
2246
2262
  onBlur: handleBlur,
2247
2263
  onChange: handleChange,
@@ -2302,6 +2318,7 @@ var MRT_CopyButton = function MRT_CopyButton(_ref) {
2302
2318
  backgroundColor: 'transparent',
2303
2319
  border: 'none',
2304
2320
  color: 'inherit',
2321
+ cursor: 'copy',
2305
2322
  fontFamily: 'inherit',
2306
2323
  fontSize: 'inherit',
2307
2324
  letterSpacing: 'inherit',
@@ -2322,15 +2339,19 @@ var MRT_TableBodyCell = function MRT_TableBodyCell(_ref) {
2322
2339
  var getIsSomeColumnsPinned = tableInstance.getIsSomeColumnsPinned,
2323
2340
  getState = tableInstance.getState,
2324
2341
  _tableInstance$option = tableInstance.options,
2342
+ editingMode = _tableInstance$option.editingMode,
2325
2343
  enableClickToCopy = _tableInstance$option.enableClickToCopy,
2326
- enablePinning = _tableInstance$option.enablePinning,
2327
2344
  enableEditing = _tableInstance$option.enableEditing,
2345
+ enablePinning = _tableInstance$option.enablePinning,
2346
+ idPrefix = _tableInstance$option.idPrefix,
2328
2347
  isLoading = _tableInstance$option.isLoading,
2329
2348
  muiTableBodyCellProps = _tableInstance$option.muiTableBodyCellProps,
2330
2349
  muiTableBodyCellSkeletonProps = _tableInstance$option.muiTableBodyCellSkeletonProps,
2331
- onCellClick = _tableInstance$option.onCellClick;
2350
+ onCellClick = _tableInstance$option.onCellClick,
2351
+ setCurrentEditingCell = tableInstance.setCurrentEditingCell;
2332
2352
 
2333
2353
  var _getState = getState(),
2354
+ currentEditingCell = _getState.currentEditingCell,
2334
2355
  currentEditingRow = _getState.currentEditingRow,
2335
2356
  isDensePadding = _getState.isDensePadding;
2336
2357
 
@@ -2350,6 +2371,23 @@ var MRT_TableBodyCell = function MRT_TableBodyCell(_ref) {
2350
2371
  var skeletonWidth = useMemo(function () {
2351
2372
  return column.columnDefType === 'display' ? column.getWidth() / 2 : Math.random() * (column.getWidth() - column.getWidth() / 3) + column.getWidth() / 3;
2352
2373
  }, [column.columnDefType, column.getWidth()]);
2374
+ var isEditable = (enableEditing || column.enableEditing) && column.enableEditing !== false;
2375
+ var isEditing = isEditable && (editingMode === 'table' || (currentEditingRow == null ? void 0 : currentEditingRow.id) === row.id || (currentEditingCell == null ? void 0 : currentEditingCell.id) === cell.id);
2376
+
2377
+ var handleDoubleClick = function handleDoubleClick(_event) {
2378
+ if ((enableEditing || column.enableEditing) && column.enableEditing !== false && editingMode === 'cell') {
2379
+ setCurrentEditingCell(cell);
2380
+ setTimeout(function () {
2381
+ var textField = document.getElementById("mrt-" + idPrefix + "-edit-cell-text-field-" + cell.id);
2382
+
2383
+ if (textField) {
2384
+ textField.focus();
2385
+ textField.select();
2386
+ }
2387
+ }, 200);
2388
+ }
2389
+ };
2390
+
2353
2391
  return React.createElement(TableCell, Object.assign({
2354
2392
  onClick: function onClick(event) {
2355
2393
  return onCellClick == null ? void 0 : onCellClick({
@@ -2357,9 +2395,11 @@ var MRT_TableBodyCell = function MRT_TableBodyCell(_ref) {
2357
2395
  cell: cell,
2358
2396
  tableInstance: tableInstance
2359
2397
  });
2360
- }
2398
+ },
2399
+ onDoubleClick: handleDoubleClick
2361
2400
  }, tableCellProps, {
2362
2401
  sx: _extends({
2402
+ cursor: isEditable && editingMode === 'cell' ? 'pointer' : 'text',
2363
2403
  maxWidth: "min(" + column.getWidth() + "px, fit-content)",
2364
2404
  minWidth: "max(" + column.getWidth() + "px, " + column.minWidth + "px)",
2365
2405
  p: isDensePadding ? column.columnDefType === 'display' ? '0 0.5rem' : '0.5rem' : column.columnDefType === 'display' ? '0.5rem 0.75rem' : '1rem',
@@ -2375,7 +2415,7 @@ var MRT_TableBodyCell = function MRT_TableBodyCell(_ref) {
2375
2415
  }, muiTableBodyCellSkeletonProps)) : column.columnDefType === 'display' ? column.Cell == null ? void 0 : column.Cell({
2376
2416
  cell: cell,
2377
2417
  tableInstance: tableInstance
2378
- }) : 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.createElement(MRT_EditCellTextField, {
2418
+ }) : cell.getIsPlaceholder() || row.getIsGrouped() && column.id !== row.groupingColumnId ? null : cell.getIsAggregated() ? cell.renderAggregatedCell() : isEditing ? React.createElement(MRT_EditCellTextField, {
2379
2419
  cell: cell,
2380
2420
  tableInstance: tableInstance
2381
2421
  }) : (enableClickToCopy || column.enableClickToCopy) && column.enableClickToCopy !== false ? React.createElement(React.Fragment, null, React.createElement(MRT_CopyButton, {
@@ -2811,19 +2851,19 @@ var getAllLeafColumnDefs = function getAllLeafColumnDefs(columns) {
2811
2851
  return !col.columns;
2812
2852
  });
2813
2853
  };
2814
- var createGroup = function createGroup(table, column, currentFilterTypes) {
2854
+ var createGroup = function createGroup(table, column, currentFilterFns) {
2815
2855
  var _column$columns;
2816
2856
 
2817
2857
  return table.createGroup(_extends({}, column, {
2818
2858
  columns: column == null ? void 0 : (_column$columns = column.columns) == null ? void 0 : _column$columns.map == null ? void 0 : _column$columns.map(function (col) {
2819
- return col.columns ? createGroup(table, col, currentFilterTypes) : createDataColumn(table, col, currentFilterTypes);
2859
+ return col.columns ? createGroup(table, col, currentFilterFns) : createDataColumn(table, col, currentFilterFns);
2820
2860
  })
2821
2861
  }));
2822
2862
  };
2823
- var createDataColumn = function createDataColumn(table, column, currentFilterTypes) {
2863
+ var createDataColumn = function createDataColumn(table, column, currentFilterFns) {
2824
2864
  return (// @ts-ignore
2825
2865
  table.createDataColumn(column.id, _extends({
2826
- filterFn: currentFilterTypes[column.id] instanceof Function ? currentFilterTypes[column.id] : defaultFilterFNs[currentFilterTypes[column.id]]
2866
+ filterFn: currentFilterFns[column.id] instanceof Function ? currentFilterFns[column.id] : defaultFilterFNs[currentFilterFns[column.id]]
2827
2867
  }, column))
2828
2868
  );
2829
2869
  };
@@ -2832,7 +2872,7 @@ var createDisplayColumn = function createDisplayColumn(table, column) {
2832
2872
  };
2833
2873
 
2834
2874
  var MRT_TableRoot = function MRT_TableRoot(props) {
2835
- 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;
2875
+ 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;
2836
2876
 
2837
2877
  var _useState = useState(props.idPrefix),
2838
2878
  idPrefix = _useState[0],
@@ -2843,50 +2883,77 @@ var MRT_TableRoot = function MRT_TableRoot(props) {
2843
2883
 
2844
2884
  return setIdPrefix((_props$idPrefix = props.idPrefix) != null ? _props$idPrefix : Math.random().toString(36).substring(2, 9));
2845
2885
  }, [props.idPrefix]);
2886
+ var initialState = useMemo(function () {
2887
+ if (!props.enablePersistentState || !props.idPrefix) {
2888
+ return props.initialState;
2889
+ }
2846
2890
 
2847
- var _useState2 = useState(null),
2848
- currentEditingRow = _useState2[0],
2849
- setCurrentEditingRow = _useState2[1];
2891
+ if (typeof window === 'undefined') {
2892
+ if (process.env.NODE_ENV !== 'production') {
2893
+ 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');
2894
+ }
2850
2895
 
2851
- var _useState3 = useState((_props$initialState$i = (_props$initialState = props.initialState) == null ? void 0 : _props$initialState.isDensePadding) != null ? _props$initialState$i : false),
2852
- isDensePadding = _useState3[0],
2853
- setIsDensePadding = _useState3[1];
2896
+ return props.initialState;
2897
+ }
2854
2898
 
2855
- var _useState4 = useState((_props$initialState$i2 = (_props$initialState2 = props.initialState) == null ? void 0 : _props$initialState2.isFullScreen) != null ? _props$initialState$i2 : false),
2856
- isFullScreen = _useState4[0],
2857
- setIsFullScreen = _useState4[1];
2899
+ var storedState = props.persistentStateMode === 'localStorage' ? localStorage.getItem("mrt-" + idPrefix + "-table-state") : props.persistentStateMode === 'sessionStorage' ? sessionStorage.getItem("mrt-" + idPrefix + "-table-state") : '{}';
2858
2900
 
2859
- var _useState5 = useState((_props$initialState$s = (_props$initialState3 = props.initialState) == null ? void 0 : _props$initialState3.showFilters) != null ? _props$initialState$s : false),
2860
- showFilters = _useState5[0],
2861
- setShowFilters = _useState5[1];
2901
+ if (storedState) {
2902
+ var parsedState = JSON.parse(storedState);
2862
2903
 
2863
- var _useState6 = useState((_props$initialState$s2 = (_props$initialState4 = props.initialState) == null ? void 0 : _props$initialState4.showGlobalFilter) != null ? _props$initialState$s2 : false),
2864
- showGlobalFilter = _useState6[0],
2865
- setShowGlobalFilter = _useState6[1];
2904
+ if (parsedState) {
2905
+ return _extends({}, props.initialState, parsedState);
2906
+ }
2907
+ }
2866
2908
 
2867
- var _useState7 = useState({
2868
- 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,
2869
- 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,
2870
- 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
2909
+ return props.initialState;
2910
+ }, []);
2911
+
2912
+ var _useState2 = useState((_initialState$current = initialState == null ? void 0 : initialState.currentEditingCell) != null ? _initialState$current : null),
2913
+ currentEditingCell = _useState2[0],
2914
+ setCurrentEditingCell = _useState2[1];
2915
+
2916
+ var _useState3 = useState((_initialState$current2 = initialState == null ? void 0 : initialState.currentEditingRow) != null ? _initialState$current2 : null),
2917
+ currentEditingRow = _useState3[0],
2918
+ setCurrentEditingRow = _useState3[1];
2919
+
2920
+ var _useState4 = useState((_initialState$isDense = initialState == null ? void 0 : initialState.isDensePadding) != null ? _initialState$isDense : false),
2921
+ isDensePadding = _useState4[0],
2922
+ setIsDensePadding = _useState4[1];
2923
+
2924
+ var _useState5 = useState((_initialState$isFullS = initialState == null ? void 0 : initialState.isFullScreen) != null ? _initialState$isFullS : false),
2925
+ isFullScreen = _useState5[0],
2926
+ setIsFullScreen = _useState5[1];
2927
+
2928
+ var _useState6 = useState((_initialState$showFil = initialState == null ? void 0 : initialState.showFilters) != null ? _initialState$showFil : false),
2929
+ showFilters = _useState6[0],
2930
+ setShowFilters = _useState6[1];
2931
+
2932
+ var _useState7 = useState((_initialState$showGlo = initialState == null ? void 0 : initialState.showGlobalFilter) != null ? _initialState$showGlo : false),
2933
+ showGlobalFilter = _useState7[0],
2934
+ setShowGlobalFilter = _useState7[1];
2935
+
2936
+ var _useState8 = useState({
2937
+ pageIndex: (_initialState$paginat = initialState == null ? void 0 : (_initialState$paginat2 = initialState.pagination) == null ? void 0 : _initialState$paginat2.pageIndex) != null ? _initialState$paginat : 0,
2938
+ pageSize: (_initialState$paginat3 = initialState == null ? void 0 : (_initialState$paginat4 = initialState.pagination) == null ? void 0 : _initialState$paginat4.pageSize) != null ? _initialState$paginat3 : 10,
2939
+ pageCount: (_initialState$paginat5 = initialState == null ? void 0 : (_initialState$paginat6 = initialState.pagination) == null ? void 0 : _initialState$paginat6.pageCount) != null ? _initialState$paginat5 : -1
2871
2940
  }),
2872
- pagination = _useState7[0],
2873
- setPagination = _useState7[1];
2941
+ pagination = _useState8[0],
2942
+ setPagination = _useState8[1];
2874
2943
 
2875
- var _useState8 = useState(function () {
2944
+ var _useState9 = useState(function () {
2876
2945
  return Object.assign.apply(Object, [{}].concat(getAllLeafColumnDefs(props.columns).map(function (c) {
2877
- var _ref, _c$filter, _props$initialState8, _props$initialState8$, _c$filterSelectOption, _ref2;
2946
+ var _ref, _c$filterFn, _initialState$current3, _c$filterSelectOption, _ref2;
2878
2947
 
2879
- 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) {
2880
- return cf.id === c.id;
2881
- })) != null ? _ref : !!((_c$filterSelectOption = c.filterSelectOptions) != null && _c$filterSelectOption.length) ? MRT_FILTER_TYPE.EQUALS : MRT_FILTER_TYPE.BEST_MATCH, _ref2;
2948
+ 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;
2882
2949
  })));
2883
2950
  }),
2884
- currentFilterTypes = _useState8[0],
2885
- setCurrentFilterTypes = _useState8[1];
2951
+ currentFilterFns = _useState9[0],
2952
+ setCurrentFilterFns = _useState9[1];
2886
2953
 
2887
- var _useState9 = useState((_props$globalFilterTy = props.globalFilterType) != null ? _props$globalFilterTy : MRT_FILTER_TYPE.BEST_MATCH_FIRST),
2888
- currentGlobalFilterType = _useState9[0],
2889
- setCurrentGlobalFilterType = _useState9[1];
2954
+ var _useState10 = useState((_props$globalFilterFn = props.globalFilterFn) != null ? _props$globalFilterFn : MRT_FILTER_OPTION.BEST_MATCH_FIRST),
2955
+ currentGlobalFilterFn = _useState10[0],
2956
+ setCurrentGlobalFilterFn = _useState10[1];
2890
2957
 
2891
2958
  var table = useMemo(function () {
2892
2959
  return createTable();
@@ -2894,7 +2961,7 @@ var MRT_TableRoot = function MRT_TableRoot(props) {
2894
2961
  var displayColumns = useMemo(function () {
2895
2962
  var _props$localization, _props$localization2, _props$localization3, _props$localization5;
2896
2963
 
2897
- return [(props.enableRowActions || props.enableEditing) && createDisplayColumn(table, {
2964
+ return [(props.enableRowActions || props.enableEditing && props.editingMode === 'row') && createDisplayColumn(table, {
2898
2965
  Cell: function Cell(_ref3) {
2899
2966
  var cell = _ref3.cell;
2900
2967
  return React.createElement(MRT_ToggleRowActionMenuButton, {
@@ -2957,12 +3024,12 @@ var MRT_TableRoot = function MRT_TableRoot(props) {
2957
3024
  width: 40,
2958
3025
  minWidth: 40
2959
3026
  })].filter(Boolean);
2960
- }, [props.enableEditing, props.enableExpandAll, props.enableExpanded, props.enableGrouping, props.enableRowActions, props.enableRowNumbers, props.enableRowSelection, props.enableSelectAll, props.localization, table]);
3027
+ }, [props.editingMode, props.enableEditing, props.enableExpandAll, props.enableExpanded, props.enableGrouping, props.enableRowActions, props.enableRowNumbers, props.enableRowSelection, props.enableSelectAll, props.localization, table]);
2961
3028
  var columns = useMemo(function () {
2962
3029
  return table.createColumns([].concat(displayColumns, props.columns.map(function (column) {
2963
- return column.columns ? createGroup(table, column, currentFilterTypes) : createDataColumn(table, column, currentFilterTypes);
3030
+ return column.columns ? createGroup(table, column, currentFilterFns) : createDataColumn(table, column, currentFilterFns);
2964
3031
  })));
2965
- }, [table, props.columns, currentFilterTypes]);
3032
+ }, [table, props.columns, currentFilterFns]);
2966
3033
  var data = useMemo(function () {
2967
3034
  return props.isLoading && !props.data.length ? [].concat(Array(10).fill(null)).map(function () {
2968
3035
  return Object.assign.apply(Object, [{}].concat(getAllLeafColumnDefs(props.columns).map(function (c) {
@@ -2975,7 +3042,7 @@ var MRT_TableRoot = function MRT_TableRoot(props) {
2975
3042
 
2976
3043
  var tableInstance = _extends({}, useTableInstance(table, _extends({
2977
3044
  //@ts-ignore
2978
- filterTypes: defaultFilterFNs,
3045
+ filterFns: defaultFilterFNs,
2979
3046
  getColumnFilteredRowModel: getColumnFilteredRowModelSync(),
2980
3047
  getCoreRowModel: getCoreRowModelSync(),
2981
3048
  getExpandedRowModel: getExpandedRowModel(),
@@ -2986,8 +3053,7 @@ var MRT_TableRoot = function MRT_TableRoot(props) {
2986
3053
  getSubRows: function getSubRows(originalRow) {
2987
3054
  return originalRow.subRows;
2988
3055
  },
2989
- globalFilterType: currentGlobalFilterType,
2990
- idPrefix: idPrefix,
3056
+ globalFilterFn: currentGlobalFilterFn,
2991
3057
  onPaginationChange: function onPaginationChange(updater) {
2992
3058
  return setPagination(function (old) {
2993
3059
  return functionalUpdate(updater, old);
@@ -2996,10 +3062,14 @@ var MRT_TableRoot = function MRT_TableRoot(props) {
2996
3062
  }, props, {
2997
3063
  columns: columns,
2998
3064
  data: data,
3065
+ idPrefix: idPrefix,
3066
+ //@ts-ignore
3067
+ initialState: initialState,
2999
3068
  state: _extends({
3069
+ currentEditingCell: currentEditingCell,
3000
3070
  currentEditingRow: currentEditingRow,
3001
- currentFilterTypes: currentFilterTypes,
3002
- currentGlobalFilterType: currentGlobalFilterType,
3071
+ currentFilterFns: currentFilterFns,
3072
+ currentGlobalFilterFn: currentGlobalFilterFn,
3003
3073
  isDensePadding: isDensePadding,
3004
3074
  isFullScreen: isFullScreen,
3005
3075
  //@ts-ignore
@@ -3008,39 +3078,69 @@ var MRT_TableRoot = function MRT_TableRoot(props) {
3008
3078
  showGlobalFilter: showGlobalFilter
3009
3079
  }, props.state)
3010
3080
  })), {
3081
+ //@ts-ignore
3082
+ setCurrentEditingCell: setCurrentEditingCell,
3083
+ //@ts-ignore
3011
3084
  setCurrentEditingRow: setCurrentEditingRow,
3012
- setCurrentFilterTypes: setCurrentFilterTypes,
3013
- setCurrentGlobalFilterType: setCurrentGlobalFilterType,
3085
+ setCurrentFilterFns: setCurrentFilterFns,
3086
+ //@ts-ignore
3087
+ setCurrentGlobalFilterFn: setCurrentGlobalFilterFn,
3014
3088
  setIsDensePadding: setIsDensePadding,
3015
3089
  setIsFullScreen: setIsFullScreen,
3016
3090
  setShowFilters: setShowFilters,
3017
3091
  setShowGlobalFilter: setShowGlobalFilter
3018
3092
  });
3019
3093
 
3094
+ useEffect(function () {
3095
+ if (typeof window === 'undefined' || !props.enablePersistentState) {
3096
+ return;
3097
+ }
3098
+
3099
+ if (!props.idPrefix && process.env.NODE_ENV !== 'production') {
3100
+ console.warn('a unique idPrefix prop is required for persistent table state to work');
3101
+ return;
3102
+ }
3103
+
3104
+ var itemArgs = ["mrt-" + idPrefix + "-table-state", JSON.stringify(tableInstance.getState())];
3105
+
3106
+ if (props.persistentStateMode === 'localStorage') {
3107
+ var _localStorage;
3108
+
3109
+ (_localStorage = localStorage).setItem.apply(_localStorage, itemArgs);
3110
+ } else if (props.persistentStateMode === 'sessionStorage') {
3111
+ var _sessionStorage;
3112
+
3113
+ (_sessionStorage = sessionStorage).setItem.apply(_sessionStorage, itemArgs);
3114
+ }
3115
+ }, [props.enablePersistentState, props.idPrefix, props.persistentStateMode, tableInstance]);
3020
3116
  return React.createElement(React.Fragment, null, React.createElement(Dialog, {
3021
- TransitionComponent: Grow,
3022
3117
  PaperComponent: Box,
3118
+ TransitionComponent: Grow,
3023
3119
  disablePortal: true,
3024
3120
  fullScreen: true,
3025
3121
  keepMounted: false,
3026
3122
  onClose: function onClose() {
3027
- return tableInstance.setIsFullScreen(false);
3123
+ return setIsFullScreen(false);
3028
3124
  },
3029
- open: tableInstance.getState().isFullScreen,
3125
+ open: isFullScreen,
3030
3126
  transitionDuration: 400
3031
3127
  }, React.createElement(MRT_TablePaper, {
3032
3128
  tableInstance: tableInstance
3033
- })), !tableInstance.getState().isFullScreen && React.createElement(MRT_TablePaper, {
3129
+ })), !isFullScreen && React.createElement(MRT_TablePaper, {
3034
3130
  tableInstance: tableInstance
3035
3131
  }));
3036
3132
  };
3037
3133
 
3038
- 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"];
3134
+ 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"];
3039
3135
  var MaterialReactTable = (function (_ref) {
3040
3136
  var _ref$autoResetExpande = _ref.autoResetExpanded,
3041
3137
  autoResetExpanded = _ref$autoResetExpande === void 0 ? false : _ref$autoResetExpande,
3138
+ _ref$autoResetSorting = _ref.autoResetSorting,
3139
+ autoResetSorting = _ref$autoResetSorting === void 0 ? false : _ref$autoResetSorting,
3042
3140
  _ref$columnResizeMode = _ref.columnResizeMode,
3043
3141
  columnResizeMode = _ref$columnResizeMode === void 0 ? 'onEnd' : _ref$columnResizeMode,
3142
+ _ref$editingMode = _ref.editingMode,
3143
+ editingMode = _ref$editingMode === void 0 ? 'row' : _ref$editingMode,
3044
3144
  _ref$enableColumnActi = _ref.enableColumnActions,
3045
3145
  enableColumnActions = _ref$enableColumnActi === void 0 ? true : _ref$enableColumnActi,
3046
3146
  _ref$enableColumnFilt = _ref.enableColumnFilters,
@@ -3081,6 +3181,8 @@ var MaterialReactTable = (function (_ref) {
3081
3181
  enableToolbarTop = _ref$enableToolbarTop === void 0 ? true : _ref$enableToolbarTop,
3082
3182
  icons = _ref.icons,
3083
3183
  localization = _ref.localization,
3184
+ _ref$persistentStateM = _ref.persistentStateMode,
3185
+ persistentStateMode = _ref$persistentStateM === void 0 ? 'sessionStorage' : _ref$persistentStateM,
3084
3186
  _ref$positionActionsC = _ref.positionActionsColumn,
3085
3187
  positionActionsColumn = _ref$positionActionsC === void 0 ? 'first' : _ref$positionActionsC,
3086
3188
  _ref$positionPaginati = _ref.positionPagination,
@@ -3093,7 +3195,9 @@ var MaterialReactTable = (function (_ref) {
3093
3195
 
3094
3196
  return React.createElement(MRT_TableRoot, Object.assign({
3095
3197
  autoResetExpanded: autoResetExpanded,
3198
+ autoResetSorting: autoResetSorting,
3096
3199
  columnResizeMode: columnResizeMode,
3200
+ editingMode: editingMode,
3097
3201
  enableColumnActions: enableColumnActions,
3098
3202
  enableColumnResizing: enableColumnResizing,
3099
3203
  enableColumnFilters: enableColumnFilters,
@@ -3115,6 +3219,7 @@ var MaterialReactTable = (function (_ref) {
3115
3219
  enableToolbarTop: enableToolbarTop,
3116
3220
  icons: _extends({}, MRT_Default_Icons, icons),
3117
3221
  localization: _extends({}, MRT_DefaultLocalization_EN, localization),
3222
+ persistentStateMode: persistentStateMode,
3118
3223
  positionActionsColumn: positionActionsColumn,
3119
3224
  positionPagination: positionPagination,
3120
3225
  positionToolbarActions: positionToolbarActions,