vueform / multiselect

Vue 3 multiselect component with single select, multiselect and tagging options (+Tailwind CSS support).
https://vueform.com
MIT License
807 stars 150 forks source link

Append dropdown to body #341

Closed mrleblanc101 closed 1 year ago

mrleblanc101 commented 1 year ago

Version

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 commented 1 year ago

i'm also facing this issue need a solution

vishnusree66 commented 1 year ago

any solution?

hamonCordova commented 1 year ago

Same problem here

hellojessicagraham commented 1 year ago

please? 🥺

phanuwit007 commented 1 year ago

please !!

MohamedHana commented 1 year ago

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 commented 1 year ago

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

mrleblanc101 commented 1 year ago

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 commented 1 year ago

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.