我正在使用 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"}
]);
最佳答案
您应该为该过滤器使用sort_as: 'none'
,read docs了解更多...
关于javascript - 如何禁用 yadcf 过滤器选项的自动排序?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35827684/