简体   繁体   中英

Angular Datatable not filtering with column reorder

In JavaScript, I have

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

with other options. And in HTML, I have a table with four columns. It works well when I don't move the columns. However, when the columns are moved, the search boxes do not work well. Any solution?

Here is the Plunkr: http://plnkr.co/edit/uPv8FoUrJkQWnEaE2AQY?p=preview

script.js has the column move logic.

After adding .withLightColumnFilter function, here is my Plunkr: http://plnkr.co/edit/Y6qTGzNWOnGGCYS3f3yi?p=preview

script.js has the .withLightColumnFilter implementation

As you can see in web console, I have error and could not proceed forward.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM