chore(slider): optimize tooltip align (#29308)

This commit is contained in:
Kermit 2021-02-10 15:53:07 +08:00 committed by GitHub
parent 7368b05b05
commit a93767562a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -19,7 +19,6 @@ const SliderTooltip = React.forwardRef<unknown, TooltipProps>((props, ref) => {
rafRef.current = raf(() => {
innerRef.current?.forcePopupAlign();
rafRef.current = null;
keepAlign();
});
}
@ -31,7 +30,7 @@ const SliderTooltip = React.forwardRef<unknown, TooltipProps>((props, ref) => {
}
return cancelKeepAlign;
}, [visible]);
}, [visible, props.title]);
return <Tooltip ref={composeRef(innerRef, ref)} {...props} />;
});