material-react-table 0.14.4 → 0.15.0

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.
@@ -5,7 +5,7 @@ import { MRT_TablePagination } from './MRT_TablePagination';
5
5
  import { MRT_ToolbarAlertBanner } from './MRT_ToolbarAlertBanner';
6
6
  import { MRT_LinearProgressBar } from './MRT_LinearProgressBar';
7
7
  import { MRT_TableInstance } from '..';
8
- import { MRT_SearchTextField } from '../inputs/MRT_SearchTextField';
8
+ import { MRT_GlobalFilterTextField } from '../inputs/MRT_GlobalFilterTextField';
9
9
 
10
10
  export const commonToolbarStyles = ({ theme }: { theme: Theme }) => ({
11
11
  backgroundColor: lighten(theme.palette.background.default, 0.04),
@@ -86,7 +86,7 @@ export const MRT_ToolbarTop: FC<Props> = ({ instance }) => {
86
86
  }}
87
87
  >
88
88
  {enableGlobalFilter && positionGlobalFilter === 'left' && (
89
- <MRT_SearchTextField instance={instance} />
89
+ <MRT_GlobalFilterTextField instance={instance} />
90
90
  )}
91
91
 
92
92
  {renderToolbarTopCustomActions?.({ instance }) ?? <span />}
@@ -95,7 +95,7 @@ export const MRT_ToolbarTop: FC<Props> = ({ instance }) => {
95
95
  ) : (
96
96
  enableGlobalFilter &&
97
97
  positionGlobalFilter === 'right' && (
98
- <MRT_SearchTextField instance={instance} />
98
+ <MRT_GlobalFilterTextField instance={instance} />
99
99
  )
100
100
  )}
101
101
  </Box>
package/src/utils.ts CHANGED
@@ -10,7 +10,7 @@ import {
10
10
  MRT_ColumnDef,
11
11
  MRT_FilterFn,
12
12
  } from '.';
13
- import { defaultFilterFNs } from './filtersFNs';
13
+ import { MRT_FilterFns } from './filtersFns';
14
14
 
15
15
  export const getAllLeafColumnDefs = (
16
16
  columns: MRT_ColumnDef[],
@@ -54,7 +54,7 @@ export const createDataColumn = <D extends Record<string, any> = {}>(
54
54
  currentFilterFns[column.id] instanceof Function
55
55
  ? currentFilterFns[column.id]
56
56
  : // @ts-ignore
57
- defaultFilterFNs[currentFilterFns[column.id]],
57
+ MRT_FilterFns[currentFilterFns[column.id]],
58
58
  ...column,
59
59
  }) as any;
60
60