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

Side Scroll #137

Open
johnenrick opened this issue Jan 16, 2018 · 6 comments
Open

Side Scroll #137

johnenrick opened this issue Jan 16, 2018 · 6 comments

Comments

@johnenrick
Copy link

Very wide table that has side scrolling don't work

@MidnightHoosk
Copy link

I was going to mention this, this is especially true on mobile. When you have a lot of headers and have to scroll on the x axis, the header does not scroll with the table body.

@buzanits
Copy link

Is there already a solution for that? It looks to work in http://jsfiddle.net/jmosbech/stFcx/ . What are we doing wrong?

@johnenrick
Copy link
Author

@buzanits what we are talking about is that the table is scrollable horizontally, not the whole document. Example is the bootstrap table responsive

@buzanits
Copy link

@johnenrick Is there a solution? A workaround?

@johnenrick
Copy link
Author

I place the table inside a div, and made that div to have the overflow-x: scrollable.
In the case of bootstrap, I place the .table-responsive class to the parent div of the table instead of placing the class to the table itself

@KevinBouzidi
Copy link

KevinBouzidi commented Apr 2, 2019

Your will have a problem because your table head will not scroll and your table body will scroll.
You can put your table into a div with overflow-x : auto;, like you said.
Then add a listener on your div to trigger the librairy event:

$('#yourScrollDivId').scroll(function () {
      $(window).trigger('resize.stickyTableHeaders');
})

It works but you have a little delay bewteen the two scrolls (not so bad)

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

4 participants