Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hide dropdown menu instead of removing it from DOM #881

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 12 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,18 @@ 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-hidden': !showContent },
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Besoin de doubler l'attribut hidden avec une classe ?

'fr-p-2w dropdown-content',
{ 'dropdown-content-left': alignLeft }
]"
role="menu"
>
<slot />
</div>
</div>
</template>

Expand Down
Loading