From 7402fcae13f0fa08452b777c719b1aefda83640b Mon Sep 17 00:00:00 2001 From: Jianzhong Chen Date: Mon, 15 Oct 2018 15:46:45 -0700 Subject: [PATCH] feat(src/index.js): expose the original event to `afterShow` and `afterHide` BREAKING CHANGE: `afterShow` and `afterHide` will now take in a parameter to handle the original event fix #406 --- src/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/index.js b/src/index.js index adc662661..7ea0dba92 100644 --- a/src/index.js +++ b/src/index.js @@ -385,7 +385,7 @@ class ReactTooltip extends React.Component { show: true }, () => { this.updatePosition() - if (isInvisible && afterShow) afterShow() + if (isInvisible && afterShow) afterShow(e) }) } } @@ -446,7 +446,7 @@ class ReactTooltip extends React.Component { show: false }, () => { this.removeScrollListener() - if (isVisible && afterHide) afterHide() + if (isVisible && afterHide) afterHide(e) }) }