when i using this code in html5 datatables, will show out console error
A[c[B]] is not a function.
i fix this issue when i change the code from datatables.bundle.js to
A= window[c[B]](A);
this is my html code.
<table class="table table-bordered table-striped table-row-bordered table-hover table-data" id="table-web-lan">
<thead>
<tr>
<th data-data="lan_id" data-class="text-center" class="min-w-50px">ID</th>
<th data-data="folder" data-class="" class="" data-visible="false">Folder</th>
<th data-data="web" data-class="" class="" data-visible="false">Web</th>
<th data-data="element" data-class="" class="">Element</th>
<th data-data="en" data-class="" class="">English</th>
<th data-data="cn" data-class="" class="">Chinese</th>
<th data-data="reg_date" data-class="" class="" data-visible="false">Date</th>
<th data-data="reg_time" data-class="" class="" data-visible="false">Time</th>
<th data-data="web_lan_function()" data-class="mw-100px">Function</th>
</tr>
</thead>
</table>
i using metronic demo27 template. and this issue actually happen in all demo template. this is just a small problem that i would let u know.
this is the html code.
<div class="table-responsive">
<table class="table table-bordered table-striped table-row-bordered table-hover table-data"
data-url="../../sql/web_lan/get_info_by_folder_and_web.php">
<thead>
<tr>
<th data-data="lan_id" data-class="text-center" class="min-w-50px">ID</th>
<th data-data="folder" data-class="" class="" data-visible="false">Folder</th>
<th data-data="web" data-class="" class="" data-visible="false">Web</th>
<th data-data="element" data-class="" class="">Element</th>
<th data-data="en" data-class="" class="">English</th>
<th data-data="cn" data-class="" class="">Chinese</th>
<th data-data="reg_date" data-class="" class="" data-visible="false">Date</th>
<th data-data="reg_time" data-class="" class="" data-visible="false">Time</th>
<th data-data="test_func()" data-class="mw-120px">Function</th>
</tr>
</thead>
</table>
</div>
$(".table-data").each(function(){
var url= $(this).attr("data-url");
var param= $(this).attr("data-param") != "" ? window[$(this).attr("data-param")] : null;
var serverSide= typeof $(this).attr("data-serverSide") != "undefined" ? true : false;
var ajax= url != undefined || param != null ? {url:url,data:param,type:"POST",dataSrc:""} : null;
if(serverSide == true && ajax != null){ajax.dataSrc = "data";}
var searchDelay= serverSide == true ? 1000 : 0;
$(this).dataTable({
responsive: false,
paging: true,
dom: dom,
buttons: buttons,
language: {url: lanPath},
ajax:ajax,
searchDelay:searchDelay,
//fixedHeader:true,
"processing": true,
"serverSide": serverSide,
"columnDefs": [{
"render": function ( data, type, row ) {return data;},
"targets": 0
},
{ "visible": true, "targets": [ 0 ] }
],
"fnDrawCallback" : function(){ //显示编号 - æ¯ä¸ªè¡¨æ ¼çš„é¦–åˆ—å¿…é¡»ç•™ç»™ç¼–å·
//手动更换datatable的按钮组件
if(web_lan.get() == LANGUAGE_CN){
$(".buttons-colvis > span").text("内容");
$(".buttons-colvis .dt-down-arrow").text("");
// alert($(".buttons-colvis > span").text());
$(".buttons-copy > span").text("复制");
$(".buttons-print > span").text("打印");
}
  this.api().column(0).nodes().each(function(cell, i) {
    cell.innerHTML = i + 1;
  });
},
});
});
Hi,
Sorry for the late reply. Noted, we will double check and fix the issue in a future update as soon as possible.
Regards.
Hi,
Could you please let us know which template, framework and demo are you referring to ? Could you please provide us a URL or screenshot ?
Please note that the code must be modified in the source folder then you need to recompile your assets folder with Gulp or Webpack.
Please note that the build tools are required only in the development environment just to compile the assets when the source folder files are modified. In the hosting/server deployment you will only need the compile assets, no need to install the build tools dependencies there.
Regards.
can someone help me to fix this issue please?
when i using this code in html5 datatables, will show out console error
A[c[B]] is not a function.
i fix this issue when i change the code from datatables.bundle.js to
A= window[c[B]](A);
// A = A[c[B]](); // this is original code from datatables.bundle.js
the error problem detected from web_lan_function() data-data
this is my html code.
<table class="table table-bordered table-striped table-row-bordered table-hover table-data"
data-url="../../sql/web_lan/get_info_by_folder_and_web.php">
<thead>
<tr>
<th data-data="lan_id" data-class="text-center" class="min-w-50px">ID</th>
<th data-data="folder" data-class="" class="" data-visible="false">Folder</th>
<th data-data="web" data-class="" class="" data-visible="false">Web</th>
<th data-data="element" data-class="" class="">Element</th>
<th data-data="en" data-class="" class="">English</th>
<th data-data="cn" data-class="" class="">Chinese</th>
<th data-data="reg_date" data-class="" class="" data-visible="false">Date</th>
<th data-data="reg_time" data-class="" class="" data-visible="false">Time</th>
<th data-data="web_lan_function()" data-class="mw-100px">Function</th>
</tr>
</thead>
</table>