From 4d3661b21e992a361f8df9a63cca4bea634611bf Mon Sep 17 00:00:00 2001 From: Aron Helser Date: Wed, 7 Mar 2018 11:54:49 -0500 Subject: [PATCH] fix(index.js): add missing argument so tooltip hides. If getContent returns '', the tooltip should hide. A missing argument caused this not to work for dynamic content. --- src/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.js b/src/index.js index 21cad77d..0c276722 100644 --- a/src/index.js +++ b/src/index.js @@ -295,7 +295,7 @@ class ReactTooltip extends Component { this.intervalUpdateContent = setInterval(() => { if (this.mount) { const {getContent} = this.props - const placeholder = getTipContent(originTooltip, getContent[0](), isMultiline) + const placeholder = getTipContent(originTooltip, '', getContent[0](), isMultiline) const isEmptyTip = typeof placeholder === 'string' && placeholder === '' this.setState({ placeholder,