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.
package/dist/cjs/index.js
CHANGED
@@ -1628,10 +1628,12 @@ const MRT_FilterTextField = ({ header, rangeFilterIndex, table, }) => {
|
|
1628
1628
|
const handleFilterMenuOpen = (event) => {
|
1629
1629
|
setAnchorEl(event.currentTarget);
|
1630
1630
|
};
|
1631
|
+
const isMounted = React.useRef(false);
|
1631
1632
|
React.useEffect(() => {
|
1632
|
-
if (column.getFilterValue() === undefined) {
|
1633
|
+
if (isMounted.current && column.getFilterValue() === undefined) {
|
1633
1634
|
handleClear();
|
1634
1635
|
}
|
1636
|
+
isMounted.current = true;
|
1635
1637
|
}, [column.getFilterValue()]);
|
1636
1638
|
if (columnDef.Filter) {
|
1637
1639
|
return (React__default["default"].createElement(React__default["default"].Fragment, null, (_e = columnDef.Filter) === null || _e === void 0 ? void 0 : _e.call(columnDef, { column, header, rangeFilterIndex, table })));
|