Skip to content

Commit

Permalink
Hide dropdown menu instead of removing it from DOM
Browse files Browse the repository at this point in the history
Note: no more smooth transition after this change
  • Loading branch information
yaaax committed Dec 18, 2024
1 parent cc47f30 commit 856267f
Showing 1 changed file with 11 additions and 13 deletions.
24 changes: 11 additions & 13 deletions confiture-web-app/src/components/ui/Dropdown.vue
Original file line number Diff line number Diff line change
Expand Up @@ -85,19 +85,17 @@ defineExpose({ buttonRef, closeOptions });
>
{{ title }}
</button>
<Transition>
<div
v-if="showContent"
:id="`dropdown-${uniqueId}`"
:class="[
'fr-p-2w dropdown-content',
{ 'dropdown-content-left': alignLeft }
]"
role="menu"
>
<slot />
</div>
</Transition>
<div
:id="`dropdown-${uniqueId}`"
:hidden="!showContent"
:class="[
'fr-p-2w dropdown-content',
{ 'dropdown-content-left': alignLeft }
]"
role="menu"
>
<slot />
</div>
</div>
</template>

Expand Down

0 comments on commit 856267f

Please sign in to comment.