Skip to content

Commit

Permalink
fix(hideDelay): update hideDelay (#1948)
Browse files Browse the repository at this point in the history
* fix(hideDelay): update hideDelay

* fix(hideDelay): default value is 0

Co-authored-by: Zhang Rui <zhangrui@growingio.com>
  • Loading branch information
Ryan Zhang and Zhang Rui committed Apr 6, 2022
1 parent d1a38d0 commit 5279bf5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/tooltip/Tooltip.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ const Tooltip = (props: TooltipProps) => {
subPrefixCls = 'tooltip',
overlayClassName,
overlayInnerClassName,
hideDelay,
...rest
} = props;
const prefixCls = usePrefixCls(subPrefixCls, customizePrefixCls);
Expand Down Expand Up @@ -98,11 +99,10 @@ const Tooltip = (props: TooltipProps) => {
}
return element;
}

return (
<Popover
{...rest}
hideDelay={tooltipLink?.link ? 300 : 0}
hideDelay={tooltipLink?.link && !hideDelay ? 300 : hideDelay || 0}
allowArrow={allowArrow}
prefixCls={customizePrefixCls}
overlayClassName={classNames(prefixCls, overlayClassName)}
Expand Down

1 comment on commit 5279bf5

@vercel
Copy link

@vercel vercel bot commented on 5279bf5 Apr 6, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.