vendredi 25 janvier 2019

DataTables checkboxes can't be clicked

I have a DataTables column that's populated with checkboxes, but for some reason I can't click on any of them.

As far as I can tell my DataTables syntax is fine, so I'm not sure what part of my code is acting up.

Here's a JS Bin. Note: The original JSON file is local, but for Fiddle purposes I added a condensed version. Also, I couldn't get the table data to display, not sure why, so I'll be providing a screenshot in a little bit.

JS snippet:

$('#table-id').DataTable( {
      columns: [
        { data: "Titles" },
        { data: "Categories" },
        { data: "Blank" } // ----------------- Populates rows with checkboxes
      ],
      columnDefs: [
        {
          className: "select-checkbox",
          orderable: false,
          targets: 2
        }
      ],
      data: tableRes, 
      pageLength: 100,
      paging: true,
      pagingType: "full_numbers",
      responsive: true,
        scrollCollapse: true,
        scrollX: true,
        scrollY: 600,
      select: {
        selector: "th:first-child",
        style: "os"
      },
      stateSave: true
    });




Aucun commentaire:

Enregistrer un commentaire