diff --git a/packages/ra-core/src/controller/useFilterState.ts b/packages/ra-core/src/controller/useFilterState.ts index 41c0699efe7..32c17b8adbe 100644 --- a/packages/ra-core/src/controller/useFilterState.ts +++ b/packages/ra-core/src/controller/useFilterState.ts @@ -1,5 +1,6 @@ import { useEffect, useRef, useState, useCallback } from 'react'; import debounce from 'lodash/debounce'; +import isEqual from 'lodash/isEqual'; import { Filter } from '../types'; interface UseFilterStateOptions { @@ -63,7 +64,7 @@ export default ({ }); useEffect(() => { - if (permanentFilterProp.current !== permanentFilter) { + if (!isEqual(permanentFilterProp.current, permanentFilter)) { permanentFilterProp.current = permanentFilter; setFilterValue({ ...permanentFilter,