language.pageLength doesn't seem to work (v2.0.1)?
language.pageLength doesn't seem to work (v2.0.1)?
I'm in the process of updating to v2.x from v1.13.x and working through some of the API changes and figuring out how to take advantage of some of what v2.x brings.
I'm trying to change the wording of the text for the page length control. The reference page for pageLength.text
(https://datatables.net/reference/feature/pageLength.text) refers to language.pageLength
and has links to https://datatables.net/reference/option/language.pageLength which all generate 404 errors.
I would expect (perhaps incorrectly?) for something like the following to work in initializing the DataTable object but it does not:
...
language : { pageLength : "Show _MENU_ articles per page" }
...
The default wording for the page length control remains in place.
I can work around this with the following initialization:
...
layout : {
topStart : { pageLength : { text : "Show _MENU_ articles per page" } }
}
...
... but it feels like there's a gap in both the implementation and in the reference manual? Or am I interpreting the information in the reference manual incorrectly?
Ron
This question has an accepted answers - jump to answer
Answers
Hi Ron,
No - that one is a bug. Apologies! What you have with
language.pageLength
should indeed work. I'll post back with a fix soon (tomorrow morning probably).Allan
Thanks for both the quick response, Allan! Incredible support, as always.
Ron
I've worked out what was going wrong - I used the wrong property name in the documentation for
pageLength.text
. It should have been pointing atlanguage.lengthMenu
, notlanguage.pageLength
(which doesn't exist!).Sorry about that!
Allan