[Tooltip] Do not warn about title property passed to wrapped element if title is not rendered
See original GitHub issueI 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:
- Created 4 years ago
- Reactions:3
- Comments:13 (13 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@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
There might be a smarter way to handle our check