diff --git a/components/config-provider/hooks/useTheme.ts b/components/config-provider/hooks/useTheme.ts index 42128da49f..fff7f1f8af 100644 --- a/components/config-provider/hooks/useTheme.ts +++ b/components/config-provider/hooks/useTheme.ts @@ -1,5 +1,5 @@ import useMemo from 'rc-util/lib/hooks/useMemo'; -import shallowEqual from 'shallowequal'; +import isEqual from 'rc-util/lib/isEqual'; import type { OverrideToken } from '../../theme/interface'; import type { ThemeConfig } from '../context'; import { defaultConfig } from '../../theme/internal'; @@ -47,7 +47,7 @@ export default function useTheme( prev.some((prevTheme, index) => { const nextTheme = next[index]; - return !shallowEqual(prevTheme, nextTheme); + return !isEqual(prevTheme, nextTheme, true); }), ); diff --git a/components/table/hooks/useFilter/FilterDropdown.tsx b/components/table/hooks/useFilter/FilterDropdown.tsx index e98238fd19..576c5e6707 100644 --- a/components/table/hooks/useFilter/FilterDropdown.tsx +++ b/components/table/hooks/useFilter/FilterDropdown.tsx @@ -1,6 +1,6 @@ import FilterFilled from '@ant-design/icons/FilterFilled'; import classNames from 'classnames'; -import shallowEqual from 'shallowequal'; +import isEqual from 'rc-util/lib/isEqual'; import type { FieldDataNode } from 'rc-tree'; import * as React from 'react'; import type { MenuProps } from '../../../menu'; @@ -232,7 +232,7 @@ function FilterDropdown(props: FilterDropdownProps) { return null; } - if (shallowEqual(mergedKeys, filterState?.filteredKeys)) { + if (isEqual(mergedKeys, filterState?.filteredKeys, true)) { return null; } @@ -444,9 +444,10 @@ function FilterDropdown(props: FilterDropdownProps) { const getResetDisabled = () => { if (filterResetToDefaultFilteredValue) { - return shallowEqual( + return isEqual( (defaultFilteredValue || []).map((key) => String(key)), selectedKeys, + true, ); } diff --git a/package.json b/package.json index 66b74b3293..6406d9344a 100644 --- a/package.json +++ b/package.json @@ -150,9 +150,8 @@ "rc-tree-select": "~5.6.0", "rc-trigger": "^5.2.10", "rc-upload": "~4.3.0", - "rc-util": "^5.25.2", + "rc-util": "^5.27.0", "scroll-into-view-if-needed": "^3.0.3", - "shallowequal": "^1.1.0", "throttle-debounce": "^5.0.0" }, "devDependencies": { @@ -187,7 +186,6 @@ "@types/react-resizable": "^3.0.0", "@types/react-sticky": "^6.0.4", "@types/react-window": "^1.8.2", - "@types/shallowequal": "^1.1.1", "@types/throttle-debounce": "^5.0.0", "@types/warning": "^3.0.0", "@typescript-eslint/eslint-plugin": "^5.40.0",