cooperino's avatar

Laravel Datatables scrollY alignment issue

Using Laravel DataTables, I noticed that when I add scrollY, then the table header and the table rows are not aligned anymore, and also, the header becomes fixed for vertical scrolling, so only the data rows are moving.

The table builder parameters:

->parameters([
    'width' => '100%',
     'autoWidth' => true,
     "scrollY"=>"300px",
     "scrollCollapse"=> true,

I can remove the scrollY, but then I don't have horizontal scrolling and it's not responsive.

What could cause the issue? Btw, I tried wrapping the entire datatable div with css styling scroll-y auto but then the pagination is also inside the scrolling so that's not good

0 likes
0 replies

Please or to participate in this conversation.