material-react-table 0.40.12 → 0.41.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.
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.40.12",
2
+ "version": "0.41.0",
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.",
@@ -3,6 +3,7 @@ import React, {
3
3
  FC,
4
4
  MouseEvent,
5
5
  useCallback,
6
+ useEffect,
6
7
  useState,
7
8
  } from 'react';
8
9
  import {
@@ -169,6 +170,10 @@ export const MRT_FilterTextField: FC<Props> = ({
169
170
  setAnchorEl(event.currentTarget);
170
171
  };
171
172
 
173
+ useEffect(() => {
174
+ setFilterValue('');
175
+ }, [columnDef._filterFn]);
176
+
172
177
  if (columnDef.Filter) {
173
178
  return <>{columnDef.Filter?.({ column, header, table })}</>;
174
179
  }
@@ -241,9 +246,7 @@ export const MRT_FilterTextField: FC<Props> = ({
241
246
  />
242
247
  )}
243
248
  </InputAdornment>
244
- ) : (
245
- <FilterListIcon style={{ marginRight: '4px' }} />
246
- ),
249
+ ) : null,
247
250
  endAdornment: !filterChipLabel && (
248
251
  <InputAdornment position="end">
249
252
  <Tooltip