Bootstrap 3 with Buttons 1.2.2 colVis missing CSS?

Bootstrap 3 with Buttons 1.2.2 colVis missing CSS?

KW802KW802 Posts: 7Questions: 1Answers: 1

We're using the current DataTables 1.10.12 version along with the current Buttons 1.2.2 extension with Bootstrap 3. The Print/CSV/Excel/PDF buttons have been no problems & easy to implement.

The problem we are having is that when trying to use the colVis button there doesn't appear to be any formatting applied. There is no fade in/out and the button links display at the bottom of the page with no formatting to them, just bunched up links. The actual button itself is displayed in the dom using the class as expected but after clicking the button is when the formatting appears to be missing.

Did we miss including a file or a setting? Here's the list of files we're including (in load order)....

  • bootstrap.min.css
  • datatables.bootstrap.min.css
  • buttons.bootstrap.min.css
  • bootstrap.min.js
  • jquery.datatables.min.js
  • dataTables.buttons.min.js
  • buttons.html5.min.js
  • buttons.print.min.js
  • buttons.colVis.min.js
  • jszip.min.js

Any help would be appreciated.

Thank you.

This question has an accepted answers - jump to answer

Answers

  • KW802KW802 Posts: 7Questions: 1Answers: 1

    Note: I have also tried columnsToggle as an alternative. Using that approach the individual column name links do appear in the buttons dom but are also unformatted and the docs (https://datatables.net/reference/button/columnsToggle) don't list a way of applying a class name to them. Because of the number of columns involved I'd prefer to get colVis working.

  • KW802KW802 Posts: 7Questions: 1Answers: 1

    HHhhhmm..... when viewing the example at https://datatables.net/extensions/buttons/examples/styling/bootstrap.html the buttons dropdown menu is being rendered a UL with a class of 'dt-button-collection dropdown-menu' but for me when I click the colVis button the links are being rendered in a div with a class of 'dt-button-collection'.

  • allanallan Posts: 61,716Questions: 1Answers: 10,108 Site admin

    Those files look okay. If you give me a link to a page showing the issue I'd be happy to take a look into it.

    Regards,
    Allan

  • KW802KW802 Posts: 7Questions: 1Answers: 1
    edited October 2016

    Allan, unfortunately the page in question is on a internal WAN and not exposed to the outside world.

    Would submitting a 'debugger' request give enough information to help narrow it down?

    Thanks

  • allanallan Posts: 61,716Questions: 1Answers: 10,108 Site admin
    Answer ✓

    Unfortunately probably not for a CSS issue. From the description above I think the issue is that the buttons.bootstrap.js file is missing, but I'm not 100% certain.

    The best way to make sure you get all the right files is to use the download builder.

    Allan

  • KW802KW802 Posts: 7Questions: 1Answers: 1

    Allan, I can't believe I missed that, thank you! :)

    That was indeed the answer.

This discussion has been closed.