Skip to content

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