Skip to content

Commit 4edc58b

Browse files
committed
fix: hide three dots menu after click
1 parent b4093a1 commit 4edc58b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

adminforth/spa/src/components/ThreeDotsMenu.vue

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212

1313
<!-- Dropdown menu -->
1414
<div
15-
v-if="showDropdown"
1615
ref="dropdownRef"
16+
:class="{'hidden': !showDropdown, 'block': showDropdown }"
1717
class="absolute z-30 right-0 mt-3 bg-lightThreeDotsMenuBodyBackground divide-y divide-gray-100 rounded-lg shadow w-44 dark:bg-darkThreeDotsMenuBodyBackground dark:divide-gray-600">
1818
<ul class="py-2 text-sm text-lightThreeDotsMenuBodyText dark:text-darkThreeDotsMenuBodyText" aria-labelledby="dropdownMenuIconButton">
1919
<li v-for="(item, i) in threeDotsDropdownItems" :key="`dropdown-item-${i}`">
@@ -174,13 +174,15 @@ async function handleActionClick(action: AdminForthActionInput, payload: any) {
174174
function startBulkAction(actionId: string) {
175175
adminforth.list.closeThreeDotsDropdown();
176176
emit('startBulkAction', actionId);
177+
showDropdown.value = false;
177178
}
178179
179180
async function injectedComponentClick(index: number) {
180181
const componentRef = threeDotsDropdownItemsRefs.value[index];
181182
if (componentRef && 'click' in componentRef) {
182183
(componentRef as any).click?.();
183184
}
185+
showDropdown.value = false;
184186
}
185187
186188
function toggleDropdownVisibility() {

0 commit comments

Comments
 (0)