material-react-table 0.40.5 → 0.40.6

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.
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.40.5",
2
+ "version": "0.40.6",
3
3
  "license": "MIT",
4
4
  "name": "material-react-table",
5
5
  "description": "A fully featured Material UI V5 implementation of TanStack React Table V8, written from the ground up in TypeScript.",
@@ -9,13 +9,11 @@ interface Props {
9
9
 
10
10
  export const MRT_TableHeadCellFilterLabel: FC<Props> = ({ header, table }) => {
11
11
  const {
12
- getState,
13
12
  options: {
14
13
  icons: { FilterAltIcon },
15
14
  localization,
16
15
  },
17
16
  } = table;
18
- const { columnFilterFns } = getState();
19
17
  const { column } = header;
20
18
  const { columnDef } = column;
21
19
 
@@ -24,7 +22,7 @@ export const MRT_TableHeadCellFilterLabel: FC<Props> = ({ header, table }) => {
24
22
  'betweenInclusive',
25
23
  'inNumberRange',
26
24
  ].includes(columnDef._filterFn);
27
- const currentFilterOption = columnFilterFns?.[header.id];
25
+ const currentFilterOption = columnDef._filterFn;
28
26
  const filterTooltip = localization.filteringByColumn
29
27
  .replace('{column}', String(columnDef.header))
30
28
  .replace(
@@ -12,7 +12,6 @@ import {
12
12
  debounce,
13
13
  IconButton,
14
14
  InputAdornment,
15
- ListItemText,
16
15
  MenuItem,
17
16
  TextField,
18
17
  TextFieldProps,
@@ -323,7 +322,16 @@ export const MRT_FilterTextField: FC<Props> = ({
323
322
  text = option.text;
324
323
  }
325
324
  return (
326
- <MenuItem key={value} value={value}>
325
+ <MenuItem
326
+ key={value}
327
+ sx={{
328
+ display: 'flex',
329
+ m: 0,
330
+ alignItems: 'center',
331
+ gap: '0.5rem',
332
+ }}
333
+ value={value}
334
+ >
327
335
  {isMultiSelectFilter && (
328
336
  <Checkbox
329
337
  checked={(
@@ -332,7 +340,7 @@ export const MRT_FilterTextField: FC<Props> = ({
332
340
  sx={{ mr: '0.5rem' }}
333
341
  />
334
342
  )}
335
- <ListItemText>{text}</ListItemText>
343
+ {text}
336
344
  </MenuItem>
337
345
  );
338
346
  },
@@ -189,6 +189,7 @@ export const MRT_TableRoot = <TData extends Record<string, any> = {}>(
189
189
  props.displayColumnDefOptions,
190
190
  props.editingMode,
191
191
  props.enableColumnDragging,
192
+ props.enableColumnFilterModes,
192
193
  props.enableColumnOrdering,
193
194
  props.enableEditing,
194
195
  props.enableExpandAll,