Bug 43394: DT - Cast pageLength to Integer
In "Edit patron card batch" the pageLength is coming from the syspref, the value is a string. But DataTable's needs an integer. Let's fix this in datatables.js, in the kohaTable's constructor Test plan: Got to cgi-bin/koha/patroncards/edit-batch.pl Enter more than 20 borrowernumbers and "Add patron(s)" Click "next" and notice that with this patch the pagination works. Without this patch the JS error is "Uncaught TypeError: can't access property "nTr", p is undefined" Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Pedro Amorim <pedro.amorim@openfifth.co.uk>
This commit is contained in:
parent
eb81e1cc5e
commit
02491b08d3
|
|
@ -1585,6 +1585,13 @@ function update_search_description(
|
|||
}
|
||||
}
|
||||
|
||||
if (
|
||||
settings.pageLength !== undefined &&
|
||||
!Number.isInteger(settings.pageLength)
|
||||
) {
|
||||
settings.pageLength = parseInt(settings.pageLength, 10);
|
||||
}
|
||||
|
||||
settings["buttons"] = _dt_buttons({ settings, table_settings });
|
||||
|
||||
var default_column_defs = [
|
||||
|
|
|
|||
Loading…
Reference in New Issue