Bug: lengthMenu starts with 0 causing NaN and Inifitiny outputs
Bug: lengthMenu starts with 0 causing NaN and Inifitiny outputs
DT 1.10.9, Jquery
Reproducible: http://live.datatables.net/bazahape/1/
I realise this is probably improper usage and there may be a better way of doing it but as a quick fix to show no records on start we put the initial lengthMenu array to 0 e.g. [ 0, 10, 50 ]. Moving to any other selection is then fine but if you then move back to 0 dataTables starts to output NaN and infinity in other places.
Side note - i did not add it to the example but on our setup when moving from 0 -> Show All -> 0 and back everything was fine.
This may be mis-use but it should at least consisntently work or not work.
Replies
Thanks for pointing this out. Yes, this is an unexpected input, but equally it probably should be handled. I'll look into it, although it might not make it for the next release.
Allan