Column not appearing except on small screen sizes

Column not appearing except on small screen sizes

brendensparks_sjsubrendensparks_sjsu Posts: 2Questions: 1Answers: 0

Link to test case: http://newdev.sjsu.edu/classes/schedules/summer-2021.php
Debugger code (debug.datatables.net): osaqog
Error messages shown: n/a
Description of problem:

(Because of the volume of HTML data being loaded, the initialization of the DataTable is connected to a user interaction to improve page load times, so you have to click the "Load Class Schedule" button to load the table)

The "Dates" column is given data-priority="3" in the HTML, but it never shows up on any screen size, except when the screen is reduced to < 434 px, and even then it's only in the expandable child row.

But I'm not using any breakpoint controls for any columns. Other than data priority and search targets, I don't have any additional attributes I'm using.

Answers

  • allanallan Posts: 54,542Questions: 1Answers: 8,528 Site admin

    Its an odd one this for certain!

    I think the first thing to do is to fix the HTML errors that are on the page - for example, at the end of the table there is </tr></tr> which isn't valid.

    The W3C validator will pick up and help correct errors: https://validator.w3.org/nu/?doc=http%3A%2F%2Fnewdev.sjsu.edu%2Fclasses%2Fschedules%2Fsummer-2021.php .

    I've tried coping a few of the rows over to a test page, which is using the same software versions as your own and it appears to work as expected: http://live.datatables.net/bamimime/1/edit / , which leads me to think that is the HTML errors that are causing the issue.

    Allan

  • brendensparks_sjsubrendensparks_sjsu Posts: 2Questions: 1Answers: 0

    Hi Allan!

    I appreciate your feedback.

    We've removed the trailing closing </tr> tag from the dataset, but we're still seeing the behavior.

    As an extra test, I added the extra closing </tr> tag to the sample you sent, but that doesn't reproduce the error.

    I also modified the initialization to be on interaction with the button instead of on page load, to better approximate our setup, but I still couldn't reproduce the error.

    http://live.datatables.net/bamimime/5/

  • allanallan Posts: 54,542Questions: 1Answers: 8,528 Site admin

    The W3C validator is still showing a lot of HTML errors on the page - I'd suggest starting by addressing them. I suspect things will work as expected when the HTML is valid.

    Regards,
    Allan

Sign In or Register to comment.