From 238cbf3cd29f1e8f7111d722f0702d2ab15311b5 Mon Sep 17 00:00:00 2001 From: Sage Abdullah Date: Tue, 23 Jan 2024 14:23:22 +0000 Subject: [PATCH] Dispatch w-dropdown:hidden event in DropdownController on tippy hide --- client/src/controllers/DropdownController.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/client/src/controllers/DropdownController.ts b/client/src/controllers/DropdownController.ts index 1120aa6ffe..8f6aeeb271 100644 --- a/client/src/controllers/DropdownController.ts +++ b/client/src/controllers/DropdownController.ts @@ -164,6 +164,10 @@ export class DropdownController extends Controller { this.dispatch('shown'); }; + const onHide = () => { + this.dispatch('hide'); + }; + return { ...(this.hasContentTarget ? { content: this.contentTarget as Content } @@ -187,6 +191,7 @@ export class DropdownController extends Controller { if (hoverTooltipInstance) { hoverTooltipInstance.enable(); } + onHide(); }, }; }