如何禁用yadcf过滤器选项的自动排序?

时间:2016-03-06 13:53:39

标签: javascript jquery yadcf

我正在使用jQuery插件yadcf plugin 。首先,我定义了一个数组all_serve_products = ["NOS","URS","NVS","NBS","CNS","NEFS"],过滤器工作正常,但其顺序已更改。

有没有办法让过滤器的选项显示数组的原始顺序?

 var all_serve_products = ["NOS","URS","NVS","NBS","CNS","NEFS"];
 var Statistic = $('#statistic').DataTable();
 yadcf.init(Statistic,[
  {column_number : 7, data: all_serve_products, filter_default_label: "Products"}
]);

enter image description here

1 个答案:

答案 0 :(得分:1)

您应该使用sort_as: 'none'代表该过滤器,read docs代表更多...