My Data Table breaks when I use "bLengthChange": false

My Data Table breaks when I use "bLengthChange": false

TXRTLTXRTL Posts: 2Questions: 2Answers: 0
edited September 2019 in Free community support

Hey all,

I built my own HTML then used DataTables CSS. Well, whenever I try to hide the "show __ entries" using "bLengthChange": false, my entire table breaks. What are the solutions? Here is what I have for that section:

<script>
$(document).ready( function () {
        $('#FinalCodeTable').dataTable( {
    "bFilter": false
    "bLengthChange": false
  } );
} );
</script>

Edited by Kevin:  Syntax highlighting. Details on how to highlight code using markdown can be found in this guide

This question has an accepted answers - jump to answer

Answers

  • kthorngrenkthorngren Posts: 20,302Questions: 26Answers: 4,769
    Answer ✓

    my entire table breaks. What are the solutions?

    When unexpected behavior occurs the first place to look is the browser's console for errors. I thin you will see a syntax error. You are missing a comma between your options:

            $('#FinalCodeTable').dataTable( {
        "bFilter": false,   // Comma goes here
        "bLengthChange": false
      } );
    

    Kevin

This discussion has been closed.