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

Filter dropdown on the table #724

Closed
GiulianoReginatto opened this issue Jun 26, 2020 · 3 comments
Closed

Filter dropdown on the table #724

GiulianoReginatto opened this issue Jun 26, 2020 · 3 comments

Comments

@GiulianoReginatto
Copy link

When the filter has more options than the table rows, the table gets overflow, instead of the dropdown being on top of the table.
Is it possible to keep the filter dropdown on top of the table?
Which CSS do I need to use?

JSFiddle: https://jsfiddle.net/y6bskvmw/

@bebetoalves
Copy link

I have a similar question. Is it possible to use the filter outside the table? Such as the search externalQuery input, where it is already possible to do this.

@TheJaredWilcurt
Copy link
Collaborator

TheJaredWilcurt commented Aug 9, 2020

@Kraysh @bebetoalves

When popping out a div to simulate a dropdown, there are tradeoffs for how to position it, particularly when inside of a scrollable parent element. You can either

  • have it pinned underneath the input field to simulate looking like a normal dropdown, completely containing the element inside the scrollable area,
  • or you can have it pinned at the root level of the page, meaning the dropdown menu would stay in it's spawned location and everything else would scroll around underneath it
  • or it could be spawned above the scrollable area and as you scroll it is moved up and down the page, still visible while it's input field is scrolled out of view.

none of these are great options. But I have mixed news for you! The library that was making this decision for you is Vue-Select. It is a 3rd party library that increased Vue-Good-Table's dist size by ~15%, and limited our user's choice. In the latest release of Vue-Good-Table (v2.21.0), we've removed this feature and replaced it with a custom slot.

Bad News! You will need to update your code if relying on filterMultiselectDropdownItems because this feature is removed.

Good News! You can now pick any multi-select library you want to handle this. Or even your own custom component. There are docs for migrating to the new feature and maintaining usage of Vue-Select if you want to keep it.

Closing this issue.

@GiulianoReginatto
Copy link
Author

GiulianoReginatto commented Sep 17, 2020

Using appendToBody in v-select has been resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants