material-react-table 1.3.7 → 1.3.9
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.
@@ -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 })));
|