material-react-table 0.22.1 → 0.22.2

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.
@@ -63,7 +63,7 @@ export declare type MRT_TableState<TData extends Record<string, any> = {}> = Tab
63
63
  isLoading: boolean;
64
64
  isFullScreen: boolean;
65
65
  showAlertBanner: boolean;
66
- showFilters: boolean;
66
+ showColumnFilters: boolean;
67
67
  showGlobalFilter: boolean;
68
68
  showProgressBars: boolean;
69
69
  showSkeletons: boolean;
@@ -1,7 +1,7 @@
1
1
  import { RankingInfo } from '@tanstack/match-sorter-utils';
2
2
  import { Row } from '@tanstack/react-table';
3
3
  export declare const fuzzy: {
4
- <TData extends Record<string, any> = {}>(row: Row<TData>, columnId: string, filterValue: string, addMeta: (item: RankingInfo) => void): boolean;
4
+ <TData extends Record<string, any> = {}>(row: Row<TData>, columnId: string, filterValue: string | number, addMeta: (item: RankingInfo) => void): boolean;
5
5
  autoRemove(val: any): boolean;
6
6
  };
7
7
  export declare const contains: {
@@ -66,7 +66,7 @@ export declare const MRT_FilterFns: {
66
66
  autoRemove(val: any): boolean;
67
67
  };
68
68
  fuzzy: {
69
- <TData_5 extends Record<string, any> = {}>(row: Row<TData_5>, columnId: string, filterValue: string, addMeta: (item: RankingInfo) => void): boolean;
69
+ <TData_5 extends Record<string, any> = {}>(row: Row<TData_5>, columnId: string, filterValue: string | number, addMeta: (item: RankingInfo) => void): boolean;
70
70
  autoRemove(val: any): boolean;
71
71
  };
72
72
  greaterThan: {
@@ -1505,10 +1505,10 @@ var MRT_ToggleFiltersButton = function MRT_ToggleFiltersButton(_ref) {
1505
1505
  setShowFilters = table.setShowFilters;
1506
1506
 
1507
1507
  var _getState = getState(),
1508
- showFilters = _getState.showFilters;
1508
+ showColumnFilters = _getState.showColumnFilters;
1509
1509
 
1510
1510
  var handleToggleShowFilters = function handleToggleShowFilters() {
1511
- setShowFilters(!showFilters);
1511
+ setShowFilters(!showColumnFilters);
1512
1512
  };
1513
1513
 
1514
1514
  return React__default.createElement(material.Tooltip, {
@@ -1517,7 +1517,7 @@ var MRT_ToggleFiltersButton = function MRT_ToggleFiltersButton(_ref) {
1517
1517
  }, React__default.createElement(material.IconButton, Object.assign({
1518
1518
  "aria-label": localization.showHideFilters,
1519
1519
  onClick: handleToggleShowFilters
1520
- }, rest), showFilters ? React__default.createElement(FilterListOffIcon, null) : React__default.createElement(FilterListIcon, null)));
1520
+ }, rest), showColumnFilters ? React__default.createElement(FilterListOffIcon, null) : React__default.createElement(FilterListIcon, null)));
1521
1521
  };
1522
1522
 
1523
1523
  var _excluded$4 = ["table"];
@@ -2232,11 +2232,11 @@ var MRT_TableHeadCellFilterContainer = function MRT_TableHeadCellFilterContainer
2232
2232
 
2233
2233
  var _getState = getState(),
2234
2234
  currentFilterFns = _getState.currentFilterFns,
2235
- showFilters = _getState.showFilters;
2235
+ showColumnFilters = _getState.showColumnFilters;
2236
2236
 
2237
2237
  var column = header.column;
2238
2238
  return React__default.createElement(material.Collapse, {
2239
- "in": showFilters,
2239
+ "in": showColumnFilters,
2240
2240
  mountOnEnter: true,
2241
2241
  unmountOnExit: true
2242
2242
  }, currentFilterFns[column.id] === 'between' ? React__default.createElement(MRT_FilterRangeFields, {
@@ -2300,7 +2300,7 @@ var MRT_TableHeadCellResizeHandle = function MRT_TableHeadCellResizeHandle(_ref)
2300
2300
 
2301
2301
  var _getState = getState(),
2302
2302
  density = _getState.density,
2303
- showFilters = _getState.showFilters;
2303
+ showColumnFilters = _getState.showColumnFilters;
2304
2304
 
2305
2305
  var column = header.column;
2306
2306
  var columnDef = column.columnDef;
@@ -2316,7 +2316,7 @@ var MRT_TableHeadCellResizeHandle = function MRT_TableHeadCellResizeHandle(_ref)
2316
2316
  borderRadius: '2px',
2317
2317
  borderRightWidth: '2px',
2318
2318
  cursor: 'col-resize',
2319
- height: showFilters && columnDefType === 'data' ? '4rem' : '2rem',
2319
+ height: showColumnFilters && columnDefType === 'data' ? '4rem' : '2rem',
2320
2320
  mr: density === 'compact' ? '-0.5rem' : '-1rem',
2321
2321
  opacity: 0.8,
2322
2322
  position: 'absolute',
@@ -2748,7 +2748,6 @@ var MRT_CopyButton = function MRT_CopyButton(_ref) {
2748
2748
  placement: "top",
2749
2749
  title: copied ? localization.copiedToClipboard : localization.clickToCopy
2750
2750
  }, React__default.createElement(material.Button, Object.assign({
2751
- "aria-label": localization.clickToCopy,
2752
2751
  onClick: function onClick() {
2753
2752
  return handleCopy(cell.getValue());
2754
2753
  },
@@ -3281,7 +3280,7 @@ var MRT_TablePaper = function MRT_TablePaper(_ref) {
3281
3280
  };
3282
3281
 
3283
3282
  var MRT_TableRoot = function MRT_TableRoot(props) {
3284
- var _initialState$columnO, _initialState$current, _initialState$current2, _initialState$density, _initialState$isFullS, _props$initialState$s, _props$initialState2, _initialState$showFil, _initialState$showGlo, _props$state3, _props$state4, _MRT_FilterFns$curren, _props$onCurrentEditi, _props$onCurrentEditi2, _props$onCurrentFilte, _props$onCurrentGloba, _props$onDensityChang, _props$onIsFullScreen, _props$onShowAlertBan, _props$onShowFiltersC, _props$onShowGlobalFi;
3283
+ var _initialState$columnO, _initialState$current, _initialState$current2, _initialState$density, _initialState$isFullS, _props$initialState$s, _props$initialState2, _initialState$showCol, _initialState$showGlo, _props$state3, _props$state4, _MRT_FilterFns$curren, _props$onCurrentEditi, _props$onCurrentEditi2, _props$onCurrentFilte, _props$onCurrentGloba, _props$onDensityChang, _props$onIsFullScreen, _props$onShowAlertBan, _props$onShowFiltersC, _props$onShowGlobalFi;
3285
3284
 
3286
3285
  var _useState = React.useState(props.tableId),
3287
3286
  tableId = _useState[0],
@@ -3324,8 +3323,8 @@ var MRT_TableRoot = function MRT_TableRoot(props) {
3324
3323
  showAlertBanner = _useState7[0],
3325
3324
  setShowAlertBanner = _useState7[1];
3326
3325
 
3327
- var _useState8 = React.useState((_initialState$showFil = initialState == null ? void 0 : initialState.showFilters) != null ? _initialState$showFil : false),
3328
- showFilters = _useState8[0],
3326
+ var _useState8 = React.useState((_initialState$showCol = initialState == null ? void 0 : initialState.showColumnFilters) != null ? _initialState$showCol : false),
3327
+ showColumnFilters = _useState8[0],
3329
3328
  setShowFilters = _useState8[1];
3330
3329
 
3331
3330
  var _useState9 = React.useState((_initialState$showGlo = initialState == null ? void 0 : initialState.showGlobalFilter) != null ? _initialState$showGlo : false),
@@ -3463,7 +3462,7 @@ var MRT_TableRoot = function MRT_TableRoot(props) {
3463
3462
  density: density,
3464
3463
  isFullScreen: isFullScreen,
3465
3464
  showAlertBanner: showAlertBanner,
3466
- showFilters: showFilters,
3465
+ showColumnFilters: showColumnFilters,
3467
3466
  showGlobalFilter: showGlobalFilter
3468
3467
  }, props.state),
3469
3468
  tableId: tableId