Removing info causes an Uncaught TypeError on Length Change
Removing info causes an Uncaught TypeError on Length Change
kdhunt2000
Posts: 8Questions: 1Answers: 0
in Bug reports
Sometimes I want to have pagination and lengthChange enabled, but I don't want to display table info (# out of # (total #)).
Take this code:
var table = $("#aTable").DataTables( {
"info": false,
"paging": true,
"pageLength": 1,
"lengthChange": true,
"lengthMenu": [ [1, -1], ["Latest","History"]],
} );
This works however, upon changing the length of the table, I get
Uncaught TypeError: Cannot read property 'length' of undefined
on line 360 of Datatables.js
Setting the info option to true does resolve this error.
It should be noted that setting info to false, or setting up the "dom" option to not include the "i" tag will also cause this issue and any combination there in.
This seems to me like a bug.
This discussion has been closed.
Replies
This is a bug in Select 1.0.0. Could you try it with the nightly which has resolved this issue. 1.0.1 will be released soon with the fix.
Allan
Confirmed fixed in the nightly. Thanks Allan, you rock!