<thead>
    {% for id, title in elements|toHeadersArray(options) %}
        {% block thead %}<th id="header-{{ id }}">{{ title }}</th>{% endblock %}
    {% endfor %}
</thead>
<tbody>
    {% for element in elements %}
        {{ bootstrap_datatable_row(element, elements|toHeadersArray(options), options) }}
    {% endfor %}
</tbody>
<thead>
    <tr>
        {% for id, title in elements|toHeadersArray(options) %}
            {% block thead %}<th id="header-{{ id }}">{{ title }}</th>{% endblock %}
        {% endfor %}
    </tr>
</thead>
<tbody>
    {% for element in elements %}
        {{ bootstrap_datatable_row(element, elements|toHeadersArray(options), options) }}
    {% endfor %}
</tbody>

Add <tr> tag to <thead> in datatable
Add <tr> tag to <thead> in datatable