Datatables.responsive not working with dynamically added table

Datatables.responsive not working with dynamically added table

Answers

  • colincolin Posts: 15,240Questions: 1Answers: 2,599

    The table is very thin, it won't shrink the width responsively if it all fits into the container space.

  • als9xdals9xd Posts: 5Questions: 2Answers: 0

    Then how come this works? https://codepen.io/TheAschr/pen/ePvJwL

  • als9xdals9xd Posts: 5Questions: 2Answers: 0

    BTW I have been resizing the window to test it.

  • kthorngrenkthorngren Posts: 21,327Questions: 26Answers: 4,949
    edited October 2018

    When inspecting the first example you are putting a table inside the original table (#container). Changing your #container from a table to a div seems to resolve the issue:
    https://codepen.io/anon/pen/wYJGWq

    Why responsive doesn't invoke on the table inside another table I don't know. Is this what you were intending?

    Kevin

This discussion has been closed.