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 - unable to control using *open* props

See original GitHub issue

Tooltip - unable to control using open props

What package(s) are you using?

Same happens also for version 6.x: Screenshot 2019-05-28 at 12 47 46

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

Screenshot 2019-05-28 at 12 50 37

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

  1. Assign Tooltip open prop to state variable (e.g. showTooltip).
  2. Change value of state variable (true->false, false->true)
  3. 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:closed
  • Created 4 years ago
  • Comments:44 (25 by maintainers)

github_iconTop GitHub Comments

1reaction
asudohcommented, Jun 4, 2019

A workaround may be force-remount technique.

0reactions
emyarodcommented, Aug 29, 2019

since this fix actually requires a breaking change, it isn’t suited for backporting to previous versions

Read more comments on GitHub >

github_iconTop 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 >

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