Responsive - Colspan - First Col, First Row Only - Why?

Responsive - Colspan - First Col, First Row Only - Why?

Howdy_McGeeHowdy_McGee Posts: 4Questions: 2Answers: 0

I have a weird issue I haven't been able to track down.

I'm using 'responsive' => true and ajax to pull my data in.

For some reason, just the first column in the first row, the column gets a colspan with the number of columns defined for the table. I.E. colspan="9" because there's 9 columns.

This doesn't happen on any of the other rows, just the first. If I disable responsive, the table displays and sorts fine / as expected. No JS errors. No response errors in my Network for the request and the return data looks legit.

These are the packages I'm running:

//cdn.datatables.net/v/dt/dt-2.3.7/cr-2.1.2/fh-4.0.6/r-3.0.8/datatables.min.js
//cdn.datatables.net/v/dt/dt-2.3.7/cr-2.1.2/fh-4.0.6/r-3.0.8/datatables.min.css

Has anyone encountered this before with responsive or any ideas why this would happen just on the first column of the first row?

Answers

  • allanallan Posts: 65,653Questions: 1Answers: 10,919 Site admin

    Can you link to a test case showing the issue please? I've just tried it with those source files and it looks like it is working okay.

    There was an error prior to 2.3.7 whereby hidden columns would be counted as well, but that was fixed by this commit which was included in 2.3.7.

    Allan

  • Howdy_McGeeHowdy_McGee Posts: 4Questions: 2Answers: 0

    Thanks for the reply, sorry for the noise, looks like a issue on my end!

    My response was returning data records, but a 0 recordsTotal and a 0 recordsFiltered. Once I resolved this, the colspan was removed and table normalized.

  • allanallan Posts: 65,653Questions: 1Answers: 10,919 Site admin

    No problem. Good to hear you've got it resolved.

    Allan

Sign In or Register to comment.