Enabling scrollY only displays horizontal scroll and headers don't move horizontally
Enabling scrollY only displays horizontal scroll and headers don't move horizontally
kthorngren
Posts: 21,391Questions: 26Answers: 4,961
Not sure if this has been asked before. When enabling only scrollY
on a table that doesn't fit the container a horizontal scroll bar is presented and the headers don't scroll horizontally. Test Case:
http://live.datatables.net/minuqixe/1/edit
The problem can also be seen with the examples in this thread.
Kevin
Replies
Yeah, that's something I'm aware of, but I haven't quite decided how to handle yet. Add
scrollX: true
and it is resolved. The problem is that horizontal scroll hasn't been enabled, so DataTables doesn't attempt to do anything about keeping the header and body insync. It could be that ifscrollY
is enabled thenscrollX
is automatically enabled. That's my best idea at the moment unless yourself or anyone else has any ideas?Allan
The only comment I have is if you automatically enable
scrollX
then make sure its documented as it might not be expected or wanted unless specifically enabled. I usually don't use the scrolling features so I have opinion one way or the other.Kevin