【问题标题】:how i can sort rows of twig table by using a Stimulus js controller? ican't use knp paginator sort我如何使用 Stimulus js 控制器对 twig 表的行进行排序?我不能使用 knp 分页器排序
【发布时间】:2023-01-13 00:46:53
【问题描述】:
<div class="table-responsive">
    <table class="table align-middle table-nowrap table-check table-striped " id="sortMe">
        <thead class="table-light">
        <tr>
            <th  city</th>
            <th contry</th>
            <th>address</th>
        </tr>
        </thead>
        <tbody>
        {% for offer in pagination -%}
            <tr>
                <td>{{ offer.city }}</td>
                <td>{{ offer.contry }}</td>
                <td>{{ offer.address  }} %</td>             
                    {% endif %}
            </tr>
        {% endfor %}
        </tbody>
    </table>
</div>

【问题讨论】:

    标签: sorting twig stimulusjs


    【解决方案1】:

    这个包可以对 Twig 表的行进行排序:https://omines.github.io/datatables-bundle/#introduction

    但它使用 jQuery 而不是 Stimulus。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2021-03-26
      • 1970-01-01
      • 2019-07-22
      • 2015-10-25
      • 1970-01-01
      • 2011-01-26
      • 1970-01-01
      相关资源
      最近更新 更多