Datatables responsive behavior is not working with Flask.

Datatables responsive behavior is not working with Flask.

risingerrisinger Posts: 7Questions: 2Answers: 0

I have been trying to get the responsive pages to work with Flask. I've loaded every .css & .js I can find including jquery.dataTables.css,
dataTables.responsive.css,
dataTables.tableTools.css.

But I always have all the columns display when I reduce the window size.

Does anyone have the responsive datatables working with Flask?

Thanks.

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 63,680Questions: 1Answers: 10,498 Site admin

    Can you link to the page so I can take a look and debug it please.

    Allan

  • risingerrisinger Posts: 7Questions: 2Answers: 0

    Thanks Allan!

    https://hhpt.selecthealth.com/

    un: allan
    pw: test

    Ed

  • allanallan Posts: 63,680Questions: 1Answers: 10,498 Site admin

    Hi,

    The Responsive extension doesn't appear to be installed on the page. You need to include the CSS and JS for Responsive if you want it to work :-)

    Allan

  • risingerrisinger Posts: 7Questions: 2Answers: 0

    Oops. I played with many iterations on several templates yesterday and didn't have them loaded on that screen after you log in.

    Can you try again? I've confirmed that they are loading.

    Ed

  • allanallan Posts: 63,680Questions: 1Answers: 10,498 Site admin

    Hi,

    So the page appears to be loading jQuery multiple times, and also DataTables twice. An old version of DataTables is overwriting the first one and I'm not sure what the resulting behaviour would be.

    Could you load both jQuery and DataTables only once on the page?

    Allan

  • risingerrisinger Posts: 7Questions: 2Answers: 0

    Thank you for the patients.

    That should be cleaned up.

  • risingerrisinger Posts: 7Questions: 2Answers: 0

    Have you found anything interesting Allan?

    I have a test page that has only the datatable from your example page under Flask. Would you like that pushed to the project to provide minimal CSS and JS loads.

    Ed

  • allanallan Posts: 63,680Questions: 1Answers: 10,498 Site admin
    Answer ✓

    Both jQuery and DataTables are still being loaded twice on your page. I'm not sure what else you want me to look at?

    Allan

  • risingerrisinger Posts: 7Questions: 2Answers: 0

    Allen - You found it!

    The layout.html page under Flask had the old version of jQuery and DataTables.

    Thank you

This discussion has been closed.