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(index.js): add missing argument so tooltip hides. #369

Merged

Conversation

aronhelser
Copy link
Collaborator

If getContent returns '', the tooltip should hide. A missing
argument caused this not to work for dynamic content.

If getContent returns '', the tooltip should hide. A missing
argument caused this not to work for dynamic content.
@aronhelser
Copy link
Collaborator Author

In my case, I was trying to display content based on position in an image:
<ReactTooltip id="overTime" getContent={[this.getTooltip, 50]} /> <img data-for="overTime" data-tip="" alt="Element rendering" src={this.props.content} />

With this fix, if this.getTooltip() returns '' (empty string), the tooltip hides.

@aronhelser aronhelser merged commit 73f37d8 into ReactTooltip:master Apr 5, 2018
@aronhelser aronhelser deleted the dynamic_content_hide_tooltip branch April 5, 2018 15:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant