在 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 实现
正如您在网络控制台中看到的,我遇到错误,无法继续。
最佳答案
您需要用户调用<script>
按正确的顺序。
关于javascript - Angular 数据表不通过列重新排序进行过滤,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33515987/