DataTable 1.9.4 fnRowCallback给出了错误的aData

时间:2014-02-12 13:53:45

标签: javascript jquery datatable

我从fnRowCallback得到了一个奇怪的错误,aData参数给了我正确的数据, 但添加了一个键{“”:“”}

fnRowCallback: function (nRow, aData, iDisplayIndex) {
    console.log(aData) // logs { ... right data ..., "":""}
}

为什么会这样?

更新更多代码

$("#datatable").dataTable({
    "bJQueryUI": false,
    "bProcessing": true,
    "bServerSide": true,
    "bPaginate": true,
    "sPageLast": false,
    "bInfo": true,
    "aaSorting": [[0, "asc"]],
    "sAjaxSource": get_route('get_registries', $('#base-name').text()),
    "aoColumns": TABLE_DATA.columns,
    "bFilter": true,
    "fnRowCallback": function (nRow, aData, iDisplayIndex) {
         console.log(aData) // logs { ... right data ..., "":""}
    },
    "oLanguage": {
        "sEmptyTable": "Não foram encontrados registros",
        "sInfo": "<span>Exibindo de <b>_START_</b> até <b>_END_</b> de <b>_TOTAL_</b> registros encontrados.</span>",
        "sInfoEmpty": " ",
        "sInfoFiltered": "",
        "sInfoThousands": ".",
        "sLengthMenu": "Exibir _MENU_ registros",
        "sLoadingRecords": "Carregando...",
        "sProcessing": "Processando...",
        "sSearch": "Pesquisa:",
        "sZeroRecords": "Não foram encontrados registros"
    }
});

0 个答案:

没有答案