ScrollY Bug With Multirow Header
ScrollY Bug With Multirow Header
Toyb
Posts: 17Questions: 8Answers: 0
The column sizes change when you add a second row header and are also using scrollY.
On example below:
(1) View with only "Output" selected an notice column sizes.
(2) Add scrollY: 200 and view Output again. Column sizes have changed.
(3) With scrollY still active, remove one header row and it works correctly again..
live.datatables.net/ziseroba/1/edit
How can I fix this or work around?
Thanks
Answers
Bump
Hi,
They do change a little bit, but not a huge amount for me. I'd expect them to change a bit since there needs to be space for the scrollbar (assuming whatever OS you are using displays a scrollbar - I'm using Windows 10 atm which is displaying scrollbars). I'll check again when I reboot into Linux (to get some work done ).
Allan
Yup - just tried Ubuntu 22.04 (Firefox) with its hidden scrollbars, and it actually looks okay to me.
Allan
Thanks for the help Alan!
I'm using Win10 and the latest Firefox. Notice the change in column sizes.
That is certainly a bit unexpected, but is it a problem? Are you giving your users the option to switch between scrolling and not scrolling?
Allan
No, not switching the scrolling option it will be on. I prefer the first column does not wrap unless it has to and columns such as age are sized small instead of expanded. Overall I don't think adding a second header row should change the way the table behaves. Thanks Alan.
Have you tried adding
nowrap
to thetable
tag. See the styleing docs for details.Kevin
Thanks Kevin, Yes I know I can do that but I do want it to wrap when needed. Adding a second header row just should not change anything. Thanks again!