material-react-table 1.3.7 → 1.3.9

Sign up to get free protection for your applications and to get access to all the features.
@@ -1548,10 +1548,12 @@ const MRT_FilterTextField = ({ header, rangeFilterIndex, table, }) => {
1548
1548
  const handleFilterMenuOpen = (event) => {
1549
1549
  setAnchorEl(event.currentTarget);
1550
1550
  };
1551
+ const isMounted = useRef(false);
1551
1552
  useEffect(() => {
1552
- if (column.getFilterValue() === undefined) {
1553
+ if (isMounted.current && column.getFilterValue() === undefined) {
1553
1554
  handleClear();
1554
1555
  }
1556
+ isMounted.current = true;
1555
1557
  }, [column.getFilterValue()]);
1556
1558
  if (columnDef.Filter) {
1557
1559
  return (React.createElement(React.Fragment, null, (_e = columnDef.Filter) === null || _e === void 0 ? void 0 : _e.call(columnDef, { column, header, rangeFilterIndex, table })));