Skip to content

Commit 8a939b2

Browse files
committed
fix: improve click handling for injected components in ThreeDotsMenu
1 parent fefdf74 commit 8a939b2

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

adminforth/spa/src/components/ThreeDotsMenu.vue

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -174,8 +174,12 @@ function startBulkAction(actionId: string) {
174174
175175
async function injectedComponentClick(index: number) {
176176
const componentRef = threeDotsDropdownItemsRefs.value[index];
177-
if (componentRef && 'click' in componentRef) {
178-
(componentRef as any).click?.();
177+
if (componentRef) {
178+
if (typeof (componentRef as any).click === 'function') {
179+
(componentRef as any).click();
180+
} else if (componentRef.$el && typeof componentRef.$el.click === 'function') {
181+
componentRef.$el.click();
182+
}
179183
}
180184
showDropdown.value = false;
181185
}

0 commit comments

Comments
 (0)