From 809252b431a45ae96029dd3f6af6169e9a407afb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BA=8C=E8=B4=A7=E7=88=B1=E5=90=83=E7=99=BD=E8=90=9D?= =?UTF-8?q?=E5=8D=9C?= Date: Wed, 28 Dec 2022 00:01:45 +0800 Subject: [PATCH] fix: Slider Tooltip appear motion not working (#39857) * fix: use native tooltip * chore: clean up * test: Update snapshot * test: Update snapshot --- .../__snapshots__/components.test.tsx.snap | 14 +++++++------- .../__tests__/__snapshots__/index.test.tsx.snap | 6 +++--- components/slider/index.tsx | 2 -- components/tooltip/style/index.tsx | 6 +----- 4 files changed, 11 insertions(+), 17 deletions(-) diff --git a/components/config-provider/__tests__/__snapshots__/components.test.tsx.snap b/components/config-provider/__tests__/__snapshots__/components.test.tsx.snap index 6c9daf135036..4ceca140244e 100644 --- a/components/config-provider/__tests__/__snapshots__/components.test.tsx.snap +++ b/components/config-provider/__tests__/__snapshots__/components.test.tsx.snap @@ -25487,7 +25487,7 @@ exports[`ConfigProvider components Slider configProvider 1`] = ` />
( const handleRender: RcSliderProps['handleRender'] = (node, info) => { const { index, dragging } = info; - const rootPrefixCls = getPrefixCls(); const { tooltip = {}, vertical } = props; const tooltipProps: SliderTooltipProps = { @@ -217,7 +216,6 @@ const Slider = React.forwardRef( title={mergedTipFormatter ? mergedTipFormatter(info.value) : ''} open={open} placement={getTooltipPlacement(tooltipPlacement ?? legacyTooltipPlacement, vertical)} - transitionName={`${rootPrefixCls}-zoom-down`} key={index} overlayClassName={`${prefixCls}-tooltip`} getPopupContainer={ diff --git a/components/tooltip/style/index.tsx b/components/tooltip/style/index.tsx index ae7c660854ec..cbfe8bd4eecf 100644 --- a/components/tooltip/style/index.tsx +++ b/components/tooltip/style/index.tsx @@ -161,11 +161,7 @@ export default (prefixCls: string, injectStyle: boolean): UseComponentStyleResul tooltipRadiusOuter: borderRadiusOuter > 4 ? 4 : borderRadiusOuter, }); - return [ - genTooltipStyle(TooltipToken), - initZoomMotion(token, 'zoom-big-fast'), - initZoomMotion(token, 'zoom-down'), - ]; + return [genTooltipStyle(TooltipToken), initZoomMotion(token, 'zoom-big-fast')]; }, ({ zIndexPopupBase, colorBgSpotlight }) => ({ zIndexPopup: zIndexPopupBase + 70,