我想阻止yadfc在发生某个点击事件之前应用任何过滤 - 即。用户将设置过滤器参数,然后单击“应用过滤器”按钮 - 有没有办法只通过点击事件手动触发过滤?
谢谢, 罗宾
答案 0 :(得分:1)
是的,您正在寻找externally_triggered: true
选项,我最近添加了此选项,请参阅externally_triggered showcase page(请参阅页面底部的代码段)并查看relevant issue
代码示例:
oTable = $('#example').dataTable({...
}).yadcf([
{
column_number : 0,
filter_container_id: 'external_filter_container_0',
},
{
column_number : 1,
filter_container_id: 'external_filter_container_1',
filter_type: 'range_number_slider'
},
{
column_number : 2,
filter_container_id: 'external_filter_container_2',
filter_type: 'range_date'
},
],
{
externally_triggered: true
});