is incorrect on preDraw is incorrect on preDraw

StadlyStadly Posts: 1Questions: 1Answers: 0

Link to test case:
Debugger code (
Error messages shown: None
Description of problem:

During the preDraw event, the is not reliable.

Is there a reason for this, or is it a bug?

$(document).ready(function() {
    "displayStart": 10,
    "preDrawCallback": function(settings) {
      console.log(this.api(); // 0 (incorrect)
    "drawCallback": function(settings) {
      console.log(this.api(); // 10 (correct)

See the test case for details.


  • allanallan Posts: 54,680Questions: 1Answers: 8,552 Site admin

    It is before the draw, so the parameters haven't fully been set. What is your goal here?


Sign In or Register to comment.