diff --git a/components/collapse/Collapse.tsx b/components/collapse/Collapse.tsx index 9ad5c24594..141391504a 100644 --- a/components/collapse/Collapse.tsx +++ b/components/collapse/Collapse.tsx @@ -62,11 +62,13 @@ const Collapse: CollapseInterface = props => { const renderExpandIcon = (panelProps: PanelProps = {}) => { const { expandIcon } = props; - const icon = (expandIcon ? ( - expandIcon(panelProps) - ) : ( - - )) as React.ReactNode; + const icon = ( + expandIcon ? ( + expandIcon(panelProps) + ) : ( + + ) + ) as React.ReactNode; return cloneElement(icon, () => ({ className: classNames((icon as any).props.className, `${prefixCls}-arrow`), @@ -110,7 +112,6 @@ const Collapse: CollapseInterface = props => { { } const Modal: ModalInterface = props => { - const { getPopupContainer: getContextPopupContainer, getPrefixCls, direction } = React.useContext( - ConfigContext, - ); + const { + getPopupContainer: getContextPopupContainer, + getPrefixCls, + direction, + } = React.useContext(ConfigContext); const handleCancel = (e: React.MouseEvent) => { const { onCancel } = props; @@ -203,7 +205,9 @@ const Modal: ModalInterface = props => { return ( { - Step: React.ClassicComponentClass; + Step: typeof RcSteps.Step; } const Steps: StepsType = props => { @@ -47,10 +48,10 @@ const Steps: StepsType = props => { const { xs } = useBreakpoint(); const { getPrefixCls, direction: rtlDirection } = React.useContext(ConfigContext); - const getDirection = React.useCallback(() => (responsive && xs ? 'vertical' : direction), [ - xs, - direction, - ]); + const getDirection = React.useCallback( + () => (responsive && xs ? 'vertical' : direction), + [xs, direction], + ); const prefixCls = getPrefixCls('steps', props.prefixCls); const iconPrefix = getPrefixCls('', props.iconPrefix); diff --git a/components/tree/DirectoryTree.tsx b/components/tree/DirectoryTree.tsx index 3ec9b6ff46..0c053cc2b1 100644 --- a/components/tree/DirectoryTree.tsx +++ b/components/tree/DirectoryTree.tsx @@ -59,7 +59,7 @@ const DirectoryTree: React.ForwardRefRenderFunction initExpandedKeys = Object.keys(keyEntities); } else if (defaultExpandParent) { initExpandedKeys = conductExpandParent( - props.expandedKeys || defaultExpandedKeys, + props.expandedKeys || defaultExpandedKeys || [], keyEntities, ); } else { diff --git a/package.json b/package.json index 2fbfa348de..02013d85f4 100644 --- a/package.json +++ b/package.json @@ -120,7 +120,7 @@ "rc-cascader": "~1.4.0", "rc-checkbox": "~2.3.0", "rc-collapse": "~3.1.0", - "rc-dialog": "~8.5.1", + "rc-dialog": "~8.6.0", "rc-drawer": "~4.3.0", "rc-dropdown": "~3.2.0", "rc-field-form": "~1.20.0", @@ -236,8 +236,6 @@ "pretty-quick": "^3.0.0", "querystring": "^0.2.0", "rc-footer": "^0.6.6", - "rc-queue-anim": "^1.6.12", - "rc-scroll-anim": "^2.5.8", "rc-tween-one": "^2.4.1", "rc-virtual-list": "^3.2.4", "react": "^17.0.1", diff --git a/typings/custom-typings.d.ts b/typings/custom-typings.d.ts index 6a204cd51b..d586d4e7b0 100644 --- a/typings/custom-typings.d.ts +++ b/typings/custom-typings.d.ts @@ -18,32 +18,12 @@ declare module 'jsonml.js/*'; declare module 'rc-pagination/*'; -declare module 'rc-animate*'; - declare module 'rc-util*'; -declare module '@ant-design/css-animation*'; - declare module 'rc-checkbox'; -declare module 'rc-radio'; - -declare module 'rc-editor-mention'; - -declare module 'rc-tabs*'; - -declare module 'rc-tree/lib/util'; - -declare module 'rc-collapse'; - -declare module 'rc-dialog'; - declare module 'rc-rate'; -declare module 'rc-queue-anim'; - -declare module 'rc-steps'; - declare module 'rc-switch'; declare module '*.json' {