Hi,
thanks for your question, and sorry for the trouble.
The JS file calculates on the fly, how many columns should be collapsed. If it can fit two columns on the small screen, only one will be collapsed, and so on.
Regards,
Tobias
Thank you, but is there a way to force it to collapse 2 columns? I looked up older topics on this, but didn’t manage to make anything work for me, unfortunately.
Hi,
I’m not really sure to be honest. As I’m not the developer of the JS code for this, I don’t know all the internals.
You could maybe try the approaches from https://wordpress.org/support/topic/defining-columns-to-collapse-1?replies=12 or https://wordpress.org/support/topic/collapse-extension-breaking-point?replies=6
Regards,
Tobias
I used the first approach and it seems easier than I thought!
Now my code looks like this:
"columnDefs": [ { "className": "min-phone-l", "targets": [ 1, 2 ] }, { "className": "min-tablet", "targets": [ 1, 2 ] }, { "orderable": false, "targets": [ 0, 1 ] }]
Hope it will work fine. 🙂
Hi,
nice find! And thanks for sharing this! I really should look into this in more detail 🙂
Best wishes,
Tobias