diff --git a/src/utils/triggers.ts b/src/utils/triggers.ts index fdcaae2c9c..02a609bb11 100644 --- a/src/utils/triggers.ts +++ b/src/utils/triggers.ts @@ -115,8 +115,10 @@ export function listenToTriggersV2(renderer: Renderer2, const showFn = useToggle ? options.toggle : options.show; if (!useToggle && trigger.close && options.hide) { - const _hide = renderer.listen(target, trigger.close, options.hide); - _registerHide.push(() => _hide); + const triggerClose = trigger.close; + const optionsHide = options.hide; + const _hide = () => renderer.listen(target, triggerClose, optionsHide); + _registerHide.push(_hide); } if (showFn) {