Skip to content

[Tooltip] Suppress "disabled button" console warning when tooltip is controlled #15303

Description

@tasinet
  • This is not a v0.x issue.
  • I have searched the issues of this repository and believe that this is not a duplicate.

Expected Behavior 🤔

When a Tooltip is controlled and has a disabled button as child, this should not raise a warning.

Current Behavior 😯

There is a "disabled button" warning in both controlled and uncontrolled Tooltips.

Context 🔦

The warning is valid when the Tooltip is uncontrolled, as it needs the button events to control its visibility.

In a controlled tooltip, having a disabled button child shouldn't be a problem, as its events do not control the Tooltip visibility.

While wrapping a <div> around the button circumvents the warning, this is not always an option: In Labs/SpeedDialAction the <Tooltip><Button></Tooltip> structure is hardcoded. See #15216

Metadata

Metadata

Assignees

No one assigned

    Labels

    good first issueGreat for first contributions. Enable to learn the contribution process.scope: tooltipChanges related to the tooltip.type: bugIt doesn't behave as expected.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions