Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(tooltip): call parent with close when controlled #7600

Conversation

scottdickerson
Copy link
Contributor

Closes #7598

When a Tooltip was controlled, there was no way for the parent to understand if a user was trying to interact with it or not. This adds the same onChange callback that an uncontrolled Tooltip calls when the user is interacting. It's up to the parent to decide whether to close the tooltip or open it

Changelog

New

  • {{new thing}}

Changed

  • Small addition to the handleUserInputOpenClose method to callback before returning for a controlled component

Removed

  • {{removed thing}}

Testing / Reviewing

Verify that if you have a controlled Tooltip that you see the onChange callback get called in the story

@scottdickerson scottdickerson requested a review from a team as a code owner January 19, 2021 23:14
@netlify
Copy link

netlify bot commented Jan 19, 2021

Deploy preview for carbon-elements ready!

Built with commit 7be9e5e

https://deploy-preview-7600--carbon-elements.netlify.app

@netlify
Copy link

netlify bot commented Jan 19, 2021

Deploy preview for carbon-components-react ready!

Built without sensitive environment variables with commit 7be9e5e

https://deploy-preview-7600--carbon-components-react.netlify.app

Copy link
Collaborator

@tw15egan tw15egan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍 ✅

Copy link
Contributor

@andreancardona andreancardona left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@scottdickerson nice! 🎉

@andreancardona andreancardona merged commit 01e2e1e into carbon-design-system:master Jan 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Tooltip]: Controlled tooltip should still invoke onChange callback when clicked
3 participants