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

Append dropdown to body #341

Closed
mrleblanc101 opened this issue May 17, 2023 · 9 comments
Closed

Append dropdown to body #341

mrleblanc101 opened this issue May 17, 2023 · 9 comments
Labels
enhancement New feature or request upcoming

Comments

@mrleblanc101
Copy link

mrleblanc101 commented May 17, 2023

Version

  • Vue version: 2 and 3

Description

Currently, the dropdown is a child of the component, it should be appended to the body using a <Teleport> (Vue 3) / <Portal> (Vue 2) to prevent making an overflow-y: auto; scrollable (ex: Inside a modal).

Demo

2023-05-17 16 04 52

Desired behavior (the dropdown should overlay everything):
Capture d’écran, le 2023-05-17 à 16 05 30

@farisnceit
Copy link

i'm also facing this issue need a solution

@vishnusree66
Copy link

any solution?

@hamonCordova
Copy link

Same problem here

@hellojessicagraham
Copy link

please? 🥺

@phanuwit007
Copy link

please !!

@MohamedHana
Copy link

Version

  • Vue version: 2 and 3

Description

Currently, the dropdown is a child of the component, it should be appended to the body using a (Vue 3) / (Vue 2) to prevent making an overflow-y: auto; scrollable (ex: Inside a modal).

Demo

2023-05-17 16 04 52

Desired behavior (the dropdown should overlay everything): Capture d’écran, le 2023-05-17 à 16 05 30

To have the desired behavior the modal body should not be scrollable.

@MohamedHana
Copy link

To have the desired behavior the modal body should not be scrollable.

@mrleblanc101
Copy link
Author

To have the desired behavior the modal body should not be scrollable.

@MohamedHana You're missing the point, I want the modal body to be scrollable if it has long content, I don't want the dropdown to trigger the scroll. The dropdown should be appended to the body of the page like every dropdown library does (like Popper.js)

adamberecz added a commit that referenced this issue Oct 6, 2023
@adamberecz adamberecz added enhancement New feature or request upcoming labels Oct 6, 2023
@adamberecz
Copy link
Collaborator

Thank you for the patience guys. It's now implemented in 2.6.3 and can be enabled with appendToBody: true. It's still experiemental and only works in Vue.js 3 so please open an issue if you encounter any problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request upcoming
Projects
None yet
Development

No branches or pull requests

8 participants