Angular Datatable未使用列重新排序进行筛选

Angular Datatable not filtering with column reorder

本文关键字:排序 筛选 未使用 Datatable 新排序 Angular      更新时间:2023-09-26

在JavaScript中,我有

$scope.dtOptionsCandidate = DTOptionsBuilder.newOptions()
    .withColReorder()
    .withLightColumnFilter({
        1: {"type": "text"},
        2: {"type": "text"},
        3: {"type": "text"}
    });

以及其他选项。在HTML中,我有一个包含四列的表。当我不移动列时,它工作得很好。但是,当移动列时,搜索框将无法正常工作。有什么解决方案吗?

这是Plunkr:http://plnkr.co/edit/uPv8FoUrJkQWnEaE2AQY?p=preview

script.js具有列移动逻辑。

添加.withLightColumnFilter函数后,这里是我的Plunkr:http://plnkr.co/edit/Y6qTGzNWOnGGCYS3f3yi?p=preview

script.js具有.withLightColumnFilter实现

正如您在web控制台中看到的,我有错误,无法继续。

您需要用户按正确顺序调用<script>