From 60aa29de6f0344c57992b77aae748495eb5e18e4 Mon Sep 17 00:00:00 2001 From: emilpalsson Date: Tue, 23 Jun 2020 20:25:09 +0200 Subject: [PATCH] Add possibility to cancel from onShow event --- src/Tooltip/js/tippy.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Tooltip/js/tippy.js b/src/Tooltip/js/tippy.js index e790cd1..3ffb455 100644 --- a/src/Tooltip/js/tippy.js +++ b/src/Tooltip/js/tippy.js @@ -169,7 +169,9 @@ class Tippy { return } - this.callbacks.show.call(popper) + if (this.callbacks.show.call(popper, data.el) === false) { + return + } // Custom react if (data.settings && data.settings.open === false) {