Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tooltip does not work with HOC button (when the button disabled) #38932

Closed
yogjin opened this issue Nov 24, 2022 · 3 comments
Closed

Tooltip does not work with HOC button (when the button disabled) #38932

yogjin opened this issue Nov 24, 2022 · 3 comments

Comments

@yogjin
Copy link

yogjin commented Nov 24, 2022

Reproduction link

Edit on CodeSandbox

Steps to reproduce

mouse up on the disabled wrapped button

What is expected?

Tooltip should be visible even if disabled hoc button is used

What is actually happening?

Tooltip is not visible

Environment Info
antd 5.0.1
React 18.2.0
System macOS Monterey
Browser Chrome

I think we can solve it if we fix this function

I tried to solve this problem using Object.setPrototypeOf(WrappedButton, Button), but i think this is not proper way to solve.

@github-actions
Copy link
Contributor

@afc163
Copy link
Member

afc163 commented Nov 24, 2022

(WrappedButton as any).__ANT_BUTTON = true;

https://codesandbox.io/s/misty-haze-23y58p?file=/src/App.tsx:177-221

@afc163
Copy link
Member

afc163 commented Nov 25, 2022

#9581 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants