diff --git a/README.md b/README.md index 572742c3..e69e9012 100644 --- a/README.md +++ b/README.md @@ -71,8 +71,8 @@ className | data-class | String | | extra custom class, can use !importan insecure | null | Bool | true, false | Whether to inject the style header into the page dynamically (violates CSP style-src but is a convenient default) border | data-border | Bool | true, false | Add one pixel white border getContent | null | Func or Array | (dataTip) => {}, [(dataTip) => {}, Interval] | Generate the tip content dynamically - afterShow | null | Func | () => {} | Function that will be called after tooltip show - afterHide | null | Func | () => {} | Function that will be called after tooltip hide + afterShow | null | Func | (evt) => {} | Function that will be called after tooltip show, with event that triggered show + afterHide | null | Func | (evt) => {} | Function that will be called after tooltip hide, with event that triggered hide disable | data-tip-disable | Bool | true, false | Disable the tooltip behaviour, default is false scrollHide | data-scroll-hide | Bool | true, false | Hide the tooltip when scrolling, default is true resizeHide | null | Bool | true, false | Hide the tooltip when resizing the window, default is true diff --git a/src/index.js b/src/index.js index 88305a0e..fb32612a 100644 --- a/src/index.js +++ b/src/index.js @@ -389,7 +389,7 @@ class ReactTooltip extends React.Component { show: true }, () => { this.updatePosition() - if (isInvisible && afterShow) afterShow() + if (isInvisible && afterShow) afterShow(e) }) } } @@ -450,7 +450,7 @@ class ReactTooltip extends React.Component { show: false }, () => { this.removeScrollListener() - if (isVisible && afterHide) afterHide() + if (isVisible && afterHide) afterHide(e) }) }