How to make datatables responsive without expand/collapse button

How to make datatables responsive without expand/collapse button

mariusslomariusslo Posts: 1Questions: 1Answers: 0

Hello,

I am trying to build an unusual design table and I was wondering how can I remodel the row if it no longer fits the container. If we use the responsive & row reorder JavaScript libraries on window resize it creates a expand/collapse button and on click creates a child element of the row in a single <tr><td></td></tr>. What I am at least hopping is that I could completely remove the row if it does not fit inside the container show the expanded child row and add custom CSS, the best way would be to remove the row and be able to apply my HTML template of the row.

To shorten the situation:
If row fits inside the container - do nothing
If row no longer fits in the container - completely remodel the row.

Example

Answers

  • colincolin Posts: 15,237Questions: 1Answers: 2,599
    edited November 2020

    I can't think of a way where that would be possible, I'm afraid.

    There are thing you can do though that might be useful. You can always show the children (without the '+') - see here, or you can never show the children (and no '+') - see here.

    Not sure if you could shoe-horn either of those into your workflow,

    Colin

This discussion has been closed.