Bug Report - draw.dt not called on initial display

Bug Report - draw.dt not called on initial display

jrussellazjrussellaz Posts: 3Questions: 1Answers: 0
edited August 2014 in Free community support

You should allow registered users to post to bug reports. Don't you want everyone to help improve your product?

The following was testing in v1.10.2.

When a datatable is create the draw.dt event is not called, the drawCallback function is called. The following example will log "getTagInfo called" to the console once, it should be twice. If you populate the dataset with multiple pages, the draw.dt event is called on page change (so is the drawCallback function). For example:

        $("#tagNoLifeCycleTable").DataTable({
            "data": tagsArray,
            "pageLength": 5,
            "columns": [{
                "data": "Title"
            }, {
                "data": "Description"
            }, {
                "data": "PID"
            }, {
                "data": "BlueSheets"
            }, {
                "data": "Specs"
            }, {
                "data": "RFQs"
            }, {
                "data": "YellowSheets"
            }, {
                "data": "POs"
            }, {
                "data": "Drawings"
            }, {
                "data": "RedSheets"
            }, {
                "data": "VendorData"
            }, {
                "data": "Receivers"
            }, {
                "data": "Receivers"
            }],
            "drawCallback": function(settings) {
                getTagInfo();
            }
        }).on("draw.dt", function() {
            getTagInfo();
        });

function getTagInfo() {
    console.log("getTagInfo called");
}

Replies

This discussion has been closed.