Bootstrap - custom dom rendering

Bootstrap - custom dom rendering

fyryefyrye Posts: 3Questions: 1Answers: 1
edited September 2017 in Free community support

I am not sure if this is intended or not.
Effectively defining a custom dom option prevents the Bootstrap 3 col-sm elements from being rendered around the info, pagination, length and search elements, even when using the default value.

See example: https://jsfiddle.net/a5socumc/1/
Versus: https://jsfiddle.net/a5socumc/2/

jQuery(function($) {
  $('#example').DataTable({
    "dom": "flrtip"
  });
});

Answers

  • fyryefyrye Posts: 3Questions: 1Answers: 1

    Looked at the source and figured it out.
    dom is extended on the DataTable.defaults with

    {
    dom: 
           "<'row'<'col-sm-6'l><'col-sm-6'f>>" +
        "<'row'<'col-sm-12'tr>>" +
        "<'row'<'col-sm-5'i><'col-sm-7'p>>",
    renderer: 'bootstrap'
    }
    //...
    

    and so on

This discussion has been closed.