0
0
mirror of https://github.com/wagtail/wagtail.git synced 2024-11-25 05:02:57 +01:00

Dispatch w-dropdown:hidden event in DropdownController on tippy hide

This commit is contained in:
Sage Abdullah 2024-01-23 14:23:22 +00:00 committed by Thibaud Colas
parent e4e4ef96de
commit 238cbf3cd2

View File

@ -164,6 +164,10 @@ export class DropdownController extends Controller<HTMLElement> {
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<HTMLElement> {
if (hoverTooltipInstance) {
hoverTooltipInstance.enable();
}
onHide();
},
};
}