Skip to content

[Tooltip] Do not warn about title property passed to wrapped element if title is not rendered  #16650

@darkowic

Description

@darkowic

I want to wrap a component that receives title property with Tooltip. Tooltips throw warning that the component can not have title property. No, I can not rename the property.

  • 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 🤔

There should not be a warning if title attribute is not rendered into the DOM.

Current Behavior 😯

Even if the title is not rendered the warning is still thrown.

Steps to Reproduce 🕹

https://codesandbox.io/s/tootip-title-warning-22hsx

Context 🔦

See codesandbox.

Your Environment 🌎

Tech Version
Material-UI v4.2.X

Is it even possible to solve? My idea is to check the element node title value after the element is rendered.

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: new featureExpand the scope of the product to solve a new problem.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions