我正在 2 分钟后自动刷新创建收件箱邮件,这会在数据表中显示新邮件。如何刷新我的数据表?
我正在尝试在datatable..as中实现子行,如 https://datatables.net/extensions/sensitive/examples/child-rows/whole-row-control.html, 但现在我遇到一个错误,无法读取属性“ Api”未定义的 输入图像描述在这里
custom.js
$(document).ready(function() {
$('#example').DataTable( {
responsive: {
details: {
type: 'column',
target: 'tr'
}
},
columnDefs: [ {
className: 'control',
orderable: false,
targets: 0
} ],
order: [ 1, 'asc' ]
} );
} );
Run Code Online (Sandbox Code Playgroud)
index.html.erb
<table id="example" class="display nowrap" cellspacing="0" width="100%">
<thead>
<tr>
<th></th>
<th>First name</th>
<th>Last name</th>
<th>Position</th>
<th>Office</th>
<th>Age</th>
<th>Start date</th>
<th>Salary</th>
<th>Extn.</th>
</tr>
</thead>
<tfoot>
<tr>
<th></th>
<th>First name</th>
<th>Last name</th>
<th>Position</th>
<th>Office</th>
<th>Age</th>
<th>Start date</th>
<th>Salary</th>
<th>Extn.</th>
</tr>
</tfoot> …Run Code Online (Sandbox Code Playgroud)