Display total number of entries next to the "LengthMenu" dropdown
Display total number of entries next to the "LengthMenu" dropdown
LePatay
Posts: 20Questions: 3Answers: 1
Hi,
Is there a ongoing feature would allow to display the total number of rows above the table, inside of the "lengthMenu" label ?
"lengthMenu": "Show _MENU_ entries on _MAX_"
I had to tweak the plugin this way to fit my needs:
// _fnFeatureHtmlLength
...
div.children().append(
settings.oLanguage.sLengthMenu.replace('_MENU_', select[0].outerHTML)
// Create a dynamically updated span
.replace('_MAX_', '<span id="dt-maxentries"></span>')
);
...
// fnUpdateInfo
...
$(nodes).html(out);
// Update span
$("#dt-maxentries").text(settings.fnFormatNumber.call(settings, max));
...
Thanks.
This discussion has been closed.
Replies
Not inside the length menu. You would have to use callbacks for that as you have done.
Regards,
Allan
OK, well, it would have been a useful option to have.
Thanks anyway for your great work!