Skip to content

Commit ee6f364

Browse files
author
dtbuild
committed
f72a029f83667a54771ff187cf8c435a47fc0d27 Fix: When restoring a state on a different page with defer render enabled, an error could be thrown as a tr hadn't been created in time.
Found while investigating https://datatables.net/forums/discussion/81318/ Sync to source repo @f72a029f83667a54771ff187cf8c435a47fc0d27
1 parent a9af4d4 commit ee6f364

File tree

5 files changed

+9
-5
lines changed

5 files changed

+9
-5
lines changed

datatables.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,5 @@
1111
],
1212
"src-repo": "http://github.com/DataTables/DataTablesSrc",
1313
"last-tag": "2.3.3",
14-
"last-sync": "77ccf9586b06c55c10a1990ebb64aea838331ae3"
14+
"last-sync": "f72a029f83667a54771ff187cf8c435a47fc0d27"
1515
}

js/dataTables.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6484,7 +6484,9 @@
64846484

64856485
// If the api is defined then we need to adjust the columns once the visibility has been changed
64866486
if (api) {
6487-
api.columns.adjust();
6487+
api.one('draw', function () {
6488+
api.columns.adjust();
6489+
});
64886490
}
64896491
}
64906492
}

js/dataTables.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

js/dataTables.min.mjs

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

js/dataTables.mjs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6449,7 +6449,9 @@ function _fnImplementState ( settings, s, callback) {
64496449

64506450
// If the api is defined then we need to adjust the columns once the visibility has been changed
64516451
if (api) {
6452-
api.columns.adjust();
6452+
api.one('draw', function () {
6453+
api.columns.adjust();
6454+
});
64536455
}
64546456
}
64556457
}

0 commit comments

Comments
 (0)