mirror of
https://github.com/DataTables/DataTables.git
synced 2025-02-27 00:54:15 +01:00
Dev fix: API page.info().page should use 0 as the start index not 1
- Math.floor should be used to have page indexes starting at 0 rather than 1, since page(n) uses 0 based indexing.
This commit is contained in:
parent
e1f4a8fa9e
commit
425eb38c5b
@ -1 +1 @@
|
||||
0d53fc629f28fb20a1434aa66826684eaeedaf57
|
||||
ad25f79e7614164e30d030d7bcc295ccd8833f7c
|
||||
|
4
media/js/jquery.dataTables.js
vendored
4
media/js/jquery.dataTables.js
vendored
@ -31,7 +31,7 @@
|
||||
// Define as an AMD module if possible
|
||||
if ( typeof define === 'function' && define.amd )
|
||||
{
|
||||
define( 'datatables', ['jquery'], factory );
|
||||
define( ['jquery'], factory );
|
||||
}
|
||||
/* Define using browser globals otherwise
|
||||
* Prevent multiple instantiations if the script is loaded twice
|
||||
@ -6773,7 +6773,7 @@
|
||||
all = len === -1;
|
||||
|
||||
return {
|
||||
"page": all ? 0 : Math.ceil( start / len ),
|
||||
"page": all ? 0 : Math.floor( start / len ),
|
||||
"pages": all ? 1 : Math.ceil( visRecords / len ),
|
||||
"start": start,
|
||||
"end": settings.fnDisplayEnd(),
|
||||
|
Loading…
x
Reference in New Issue
Block a user