question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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

See original GitHub issue

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.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:3
  • Comments:13 (13 by maintainers)

github_iconTop GitHub Comments

1reaction
oliviertassinaricommented, Jul 29, 2019

@jamesgeorge007 Sure, feel free to go ahead 😃. You should have all the information you need in https://github.com/mui-org/material-ui/issues/16650#issuecomment-513569912

1reaction
joshwoodingcommented, Jul 19, 2019

There might be a smarter way to handle our check

Read more comments on GitHub >

github_iconTop Results From Across the Web

[Tooltip] Do not warn about title property passed to wrapped ...
I want to wrap a component that receives title property with Tooltip. Tooltips throw warning that the component can not have title property....
Read more >
Conditionally activate Material UI tooltip? - Stack Overflow
It is worth noting that React now throws a warning if you pass null to the title prop on Tooltip. You can pass...
Read more >
React Tooltip component - Material UI - MUI
Tooltips display informative text when users hover over, focus on, or tap an element.
Read more >
Tooltips - Bootstrap
Tooltips with zero-length titles are never displayed. Specify container: 'body' to avoid rendering ... Triggering tooltips on hidden elements will not work.
Read more >
Tooltip | Directives - BootstrapVue
If a title is not provided (or is an empty string), the tooltip will not show. Specify container: 'body' (the default) to avoid...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found