1
0
mirror of https://github.com/DataTables/DataTables.git synced 2025-02-19 17:54:14 +01:00

Fix: Don't redraw the table for page change when no change needed

- If you were to click the 'previous' button when on the first page, the
  table would redraw - that's the easiest manifestation of this bug to
  see. There is no need to redraw the table when the paging hasn't
  changed, so don't.

- This fixes DataTables/DataTables #304
This commit is contained in:
Allan Jardine 2014-04-18 08:27:51 +01:00
parent 22023595e8
commit 950110e1fd
2 changed files with 6 additions and 4 deletions

View File

@ -1 +1 @@
1d90761f159e7ff2b4453ce6ce246a79babdc426
3911b8970e90370e8edf4f093f1afcbc2feb859b

View File

@ -3322,10 +3322,12 @@
var changed = settings._iDisplayStart !== start;
settings._iDisplayStart = start;
_fnCallbackFire( settings, null, 'page', [settings] );
if ( changed ) {
_fnCallbackFire( settings, null, 'page', [settings] );
if ( redraw ) {
_fnDraw( settings );
if ( redraw ) {
_fnDraw( settings );
}
}
return changed;