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

Ability to wrap table in .table-responsive #81

Closed
cosmin opened this issue Jul 25, 2016 · 4 comments
Closed

Ability to wrap table in .table-responsive #81

cosmin opened this issue Jul 25, 2016 · 4 comments

Comments

@cosmin
Copy link

cosmin commented Jul 25, 2016

Sometimes the tables being displayed are too large to fit in a single screen and need to be scrolled horizontally. Luckily boostrap makes this easy by wrapping the table itself in a <div class="table-responsive">, however there is no easy way to accomplish this using vue-tables. Wrapping the entire component in .table-responsive makes the pagination controls and footer also scroll which is undesirable.

Thoughts on adding this by default to the template? Or perhaps adding an option to accomplish this?

@cosmin cosmin changed the title Ability to wrap table in .table-responsive Ability to wrap table in .table-responsive Jul 25, 2016
@matfish2
Copy link
Owner

The skin option allows you to add any classes to the table itself, but I gather the class needs to applied to a wrapper. I will consider adding one.
Meanwhile, you might wanna check out the columnsDisplay options which allows for hiding certain columns depending on the screen size.

@matfish2 matfish2 reopened this Jul 25, 2016
@cosmin
Copy link
Author

cosmin commented Jul 25, 2016

skin is where I started, but yes, it needs to be added to a wrapper. I did look at columnsDisplay but that doesn't help my current situation because I can't hide any columns, I need to display them all and allow the user to scroll. For example, imagine a web frontend for viewing a database schema complete with browsing the data in tables. The tables can be arbitrarily wide, and hiding columns would not be an option.

I'd volunteer a patch but I'm relatively new to vue and I'm not sure I could do this in an idiomatic fashion. But I can give it a shot if it would help.

@matfish2
Copy link
Owner

I have added a wrapper and a new wrapperClasses option.
Pull the latest version (1.4.62) from npm and you should be good to go.

@cosmin
Copy link
Author

cosmin commented Jul 26, 2016

That worked great. Thanks!

ivob-fut pushed a commit to futurumshop/vue-tables that referenced this issue Sep 27, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants