【发布时间】:2019-12-02 14:16:44
【问题描述】:
这是我的 HTML/twig:
<table
class="table table-striped"
data-toggle="datatable"
data-number-rows-display=5
>
<thead>
<tr>
<th data-exportable="true" data-sortable="true">Nom</th>
<th data-exportable="true" data-sortable="true">Prénom</th>
<th data-exportable="true">Téléphone fixe</th>
<th data-exportable="true">Téléphone portable</th>
<th></th>
<th></th>
</tr>
</thead>
<tbody>
{% for individual in people %}
<tr>
<td class="align-middle">{{ individual.lastname }}</td>
<td class="align-middle">{{ individual.firstname }}</td>
<td class="align-middle"><div class="phone">{{ individual.homePhoneNumber }}</div></td>
<td class="align-middle"><div class="phone">{{ individual.cellPhoneNumber }}</div></td>
<td class="align-middle column-action">
<a
href="{{ path('people_edit', { 'id': individual.id }) }}"
class="btn btn-secondary"
data-toggle="modal"
data-target="#information-people-{{ individual.id }}"
>
<i class="icon ion-md-repeat"></i> Relancer
</a>
</td>
</tr>
{% endfor %}
</tbody>
</table>
我使用data-toggle="datatable" 来切换我数组上的DataTable。
我的 javascript 控制台向我发出警告 i is undefined jquery.datatables.min.js。我不明白这是什么意思以及如何解决它。
【问题讨论】:
标签: jquery html datatables twig