1

I'm using DataTables with the Responsive extension and both work really well. However, I now have a table where I have used class and data-priority in order to control which columns are hidden first when screen resolution decreases.

See example: https://jsfiddle.net/L71u3vu7/3/

The example works quite well as long as the first column is visible. If you further decrease the table's width the first column gets hidden as expected. However, with that also the toggle button vanishes.

I'm not quite sure if this is a bug or just the result of placing the toggle button within the first column by default. If it is the latter, the only way to circumvent this would be to reorder the column order, right?

I could also place the toggle button to the right hand side of the table but currently I don't really want to change the position if there's another way.

What are your suggestions?

gabriel
  • 347
  • 3
  • 18
  • You are right when you say it places it in the first column by default, its done by CSS, so not very configurable. The only other option I could suggest is using a empty column just for the expand/collapse button. Http://stackoverflow.com/questions/39271742/datatables-responsive-priority/39292411#39292411 – Tom Glover Nov 23 '16 at 15:47
  • Yes, I tried that too and of course that works. But I was wondering if there was a solution without extra column. Honestly, I thought that if the first column is hidden the expand/collapse button would be moved to the next (still) visible column. – gabriel Nov 24 '16 at 07:29

0 Answers0