Insert a DIV in layout

Insert a DIV in layout

poisonspoisons Posts: 27Questions: 4Answers: 0

There should be something very simple not working, but I cannot see.
I am not able to insert a custom DIV in layout, just before the search box
Do you see something wrong I cannot?
Also, the placeholder for search doesn't show up.
All the modification to the pagelength work, modifications to topEnd sections no, it always display the search box, even if I delete it from the Layout.

$('#productsTable').DataTable({
      layout: {
        topStart: {
          pageLength: {
            menu: [ 10, 25, 50, 100 ]
          }
        },
        topEnd: {
          div: {
            className: "form-check form-switch d-inline-block align-middle me-3",
            id: "problemSwitchContainer",
            title: "Show only products with problems",
            innerHTML:
              '<input class="form-check-input" type="checkbox" id="problemSwitch">' +
              '<label class="form-check-label small" for="problemSwitch">Only Problems</label>'
          },
          search: {
            placeholder: 'Search...'
          }
        }
      }
});

This question has an accepted answers - jump to answer

Answers

Sign In or Register to comment.