Responsive Tables Issue

Responsive Tables Issue

playerspaceplayerspace Posts: 14Questions: 7Answers: 0

There seems to be an issue with responsive tables. If I drag the width of the browser, yes, the tables respond as expected. But when I hit the restore down button, it doesnt refresh the tables.

Note the following screen shots. I circled in red where I clicked.

https://postimg.org/image/nap8t6gef

https://postimg.org/image/inj6ret1j

https://postimg.org/image/5uv2rhhfr

As you can see, when I restore then restore back the column header widths are all messed up and dont correspond properly.

I suspect this is not limited to responsive tables, but that's just my gut. Haven't tested it.

Answers

  • allanallan Posts: 61,743Questions: 1Answers: 10,111 Site admin

    Thanks for your question - however, per the forum rules can you link to a test case showing the issue please. This will allow the issue to be debugged.

    Information on how to create a test page, if you can't provide a link to your own page can be found here.

    Thanks,
    Allan

  • playerspaceplayerspace Posts: 14Questions: 7Answers: 0
  • allanallan Posts: 61,743Questions: 1Answers: 10,111 Site admin

    What browser is it you are using? Chrome seems to be okay, but Edge does appear to get it a bit wrong. i'm not immediately sure why that is I'm afraid.

    Allan

  • playerspaceplayerspace Posts: 14Questions: 7Answers: 0

    I am using Chrome for PC, latest version. Is there a command to force the datatables to realign the columns? I can just add that to a window resize function.

  • allanallan Posts: 61,743Questions: 1Answers: 10,111 Site admin

    Is there a command to force the datatables to realign the columns?

    columns.adjust(). The thing is, that is already inside a resize event handler. This issue suggests that the resize hasn't completed.

    Allan

  • playerspaceplayerspace Posts: 14Questions: 7Answers: 0

    I need a solution to this bug. Can you look into it deeper?

  • playerspaceplayerspace Posts: 14Questions: 7Answers: 0

    Just as a heads up, I added this code to my page:

                $(window).resize(function() 
                {
                    var table = $('##background_check').DataTable(); 
                    table.columns.adjust().draw();  
                }); 
    

    and it resolved it. Not exactly an ideal solution but it works.

  • allanallan Posts: 61,743Questions: 1Answers: 10,111 Site admin

    Thanks. I will look into what is required to addressing this in the software.

    Allan

This discussion has been closed.