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 disappear when components are disabled #1806

Closed
augustosnk12 opened this issue Feb 9, 2021 · 2 comments
Closed

Tooltip does not disappear when components are disabled #1806

augustosnk12 opened this issue Feb 9, 2021 · 2 comments
Assignees
Labels
Type: Enhancement Issue contains an enhancement related to a specific component. Additional functionality has been add
Milestone

Comments

@augustosnk12
Copy link

I'm submitting a ... (check one with "x")

[ x] bug report
[ ] feature request
[ ] support request => Please do not submit support request here, instead see https://forum.primefaces.org/viewforum.php?f=57

Codesandbox Case (Bug Reports)
Please fork the codesandbox below and create a case demonstrating your bug report. Issues without a codesandbox have much less possibility to be reviewed.

https://codesandbox.io/s/primereact-test-forked-p1xdo?file=/src/index.js:0-785

Current behavior
When I use the Tooltip property on Button component and disable the button when clicked the Tooltip text it's still displayed, instead of just unshow.

Expected behavior
When disable the button not show the Tooltip text.

  • React version:
    ^17.0.1

  • PrimeReact version:
    6.0.1

  • Browser: [all]

  • Language: [all]

@augustosnk12 augustosnk12 changed the title Tooltip not disappear when button component is disabled Tooltip does not disappear when button component is disabled Feb 13, 2021
@mertsincan mertsincan changed the title Tooltip does not disappear when button component is disabled Tooltip does not disappear when components are disabled Feb 25, 2021
@mertsincan mertsincan self-assigned this Feb 25, 2021
@mertsincan mertsincan added the Type: Enhancement Issue contains an enhancement related to a specific component. Additional functionality has been add label Feb 25, 2021
@mertsincan mertsincan added this to the 6.1.0 milestone Feb 25, 2021
@mertsincan
Copy link
Member

mertsincan commented Feb 25, 2021

Added 'disabled' option to Tooltip on 6.1.0. After 6.1.0 has been released, please use;

<Button
          style={{ height: "40px", width: "100px", background: "gold" }}
          label="Click"
          onClick={() => {
            setDisableButton(true);
          }}
          tooltip="Tooltip text displayed always"
          tooltipOptions={{disabled: disableButton}} // please add this line
          disabled={disableButton}
/>

Best Regards,

@melloware
Copy link
Member

See PR: #2427

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Enhancement Issue contains an enhancement related to a specific component. Additional functionality has been add
Projects
None yet
Development

No branches or pull requests

3 participants