Browse Source

fix(Tooltip): the mistake that tooltip mount on wrong dom (#30963)

when getPopupContainer of tooltip's props is undefined or null
pull/30970/head
gaozhenqian 4 years ago
committed by GitHub
parent
commit
832aa81c82
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      components/tooltip/index.tsx

5
components/tooltip/index.tsx

@ -202,10 +202,11 @@ const Tooltip = React.forwardRef<unknown, TooltipProps>((props, ref) => {
return overlay || title || '';
};
const { getPopupContainer, ...otherProps } = props;
const {
prefixCls: customizePrefixCls,
openClassName,
getPopupContainer,
getTooltipContainer,
overlayClassName,
color,
@ -244,7 +245,7 @@ const Tooltip = React.forwardRef<unknown, TooltipProps>((props, ref) => {
return (
<RcTooltip
{...props}
{...otherProps}
prefixCls={prefixCls}
overlayClassName={customOverlayClassName}
getTooltipContainer={getPopupContainer || getTooltipContainer || getContextPopupContainer}

Loading…
Cancel
Save