Nette と一緒に動作する DataTables に問題があります。
私の JavaScript コード:
$(document).ready(function(){
$('.table').DataTables();
});
HTML ネット:
{snippet customers}
<table class="table table-hover" id="userTable">
<thead>
<tr>
<th>Name</th>
<th>Country</th>
<th>Type</th>
</tr>
</thead>
<tbody>
{foreach $customers as $customer}
<tr>
<td>
<a href="{$presenter->link(':Customers:show', array('id' => $customer->id))}" target="_blank">
{$customer->name}
</a>
</td>
<td>{$customer->country}</td>
<td>{$customer->type}</td>
</tr>
{/foreach}
</tbody>
</table>
{/snippet}
通常は機能しますが、Nette スニペットが更新されると、DataTables 要素 (ページ、注文など) が削除されます。ページが更新されると、これらの要素が返されます。私は Nette Framework 2.3 と Doctrine 2 を使用しています。