Tooltip - unable to control using *open* props
See original GitHub issueTooltip - unable to control using open props
What package(s) are you using?
Same happens also for version 6.x:
-
carbon-components
- [ x]
carbon-components-react
Detailed description
Unable to control visibility state of the Tooltip (open/close), using already existing open prop. It could be easy observed using provided codesandbox.
What offering/product do you work on? Any pressing ship or release dates we should be aware of? We need this functionality in IBM SPSS Statistics. Tooltips are the last components we are trying to migrate from ap-components-react to Carbon.
Steps to reproduce the issue
- Assign Tooltip open prop to state variable (e.g. showTooltip).
- Change value of state variable (true->false, false->true)
- Result: Tooltip doesn’t react on changes on open prop.
Expected: Tooltip will react on change for open prop
Please create a reduced test case in CodeSandbox https://codesandbox.io/embed/codesandbox-lo5ox
Issue exists on both carbon-components-react versions 6.x and 7.x. We are expecting a fix for version 6.x.
It’s a blocking issue for us.
Issue Analytics
- State:
- Created 4 years ago
- Comments:44 (25 by maintainers)
Top Results From Across the Web
Programmatically open Tooltip in Material-UI - Stack Overflow
I know it has open prop that allows to do so, but in this case I will be switching component from uncontrolled to...
Read more >Controlling tooltips & pop-up menus with components in React
1. Open the tooltip ; isOpen and ; style states to show/hide and position the tooltip component respectively. Also, it is required to...
Read more >ARIA: tooltip role - Accessibility - MDN Web Docs - Mozilla
A tooltip is a contextual text bubble that displays a description for an element that appears on pointer hover or keyboard focus.
Read more >Tooltip | Components - BootstrapVue
The target element must exist in the document before <b-tooltip> is mounted. If the target element is not found during mount, the tooltip...
Read more >JavaScript · Bootstrap
Don't use data attributes from multiple plugins on the same element. For example, a button cannot both have a tooltip and toggle a...
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
A workaround may be force-remount technique.
since this fix actually requires a breaking change, it isn’t suited for backporting to previous versions