Search code examples
datatables-1.10yadcf

I can't make cumulative_filtering work


I am using yadcf 0.8.8 and DataTables 1.10.10 with Select2 3.5.3. My data source is from AJAX but I am not using server side processing. I could not make the cumulative_filtering work. It looks very straight forward, but clearly something is not right. Any idea what I might be doing wrong?

yadcf.init(oTable, 
    [
        {
            column_number: 0,
            filter_default_label: "...",
            filter_type: "multi_select",
            select_type: 'select2',
            filter_reset_button_text: false
        }, {
            column_number: 1,
            filter_default_label: "...",
            filter_type: "multi_select",
            select_type: 'select2',
            sort_as: 'none',
            filter_match_mode: 'exact',
            filter_reset_button_text: false
        }, {
            column_number: 2,
            filter_default_label: "...",
            filter_type: "multi_select",
            select_type: 'select2',
            filter_reset_button_text: false
        }, {
            column_number: 3,
            filter_default_label: "...",
            filter_type: "multi_select",
            select_type: 'select2',
            filter_reset_button_text: false
        }, {
            column_number: 4,
            filter_default_label: "...",
            filter_type: "multi_select",
            select_type: 'select2',
            filter_reset_button_text: false
        }, {
            column_number: 5,
            filter_default_label: "...",
            filter_type: "multi_select",
            select_type: 'select2',
            filter_reset_button_text: false
        }, {
            column_number: 6,
            filter_default_label: "...",
            filter_type: "multi_select",
            select_type: 'select2',
            filter_reset_button_text: false
        }, {
            column_number: 7,
            filter_default_label: "...",
            filter_reset_button_text: false
        }, {
            column_number: 8,
            filter_type: "range_number_slider",
            filter_delay: 400,
            filter_reset_button_text: false
        }, {
            column_number: 9,
            filter_type: "range_number_slider",
            filter_delay: 400,
            filter_reset_button_text: false
        }, {
            column_number: 10,
            filter_type: "range_number_slider",
            filter_delay: 400,
            filter_reset_button_text: false
            //SalesPrice
        }, {
            column_number: 11,
            filter_default_label: "...",
            filter_type: "multi_select",
            select_type: 'select2',
            filter_reset_button_text: false
        }, {
            column_number: 12,
            filter_default_label: "...",
            filter_type: "text",
            filter_delay: 400,
            case_insensitive: true,
            filter_reset_button_text: false
        }
    ],
    {
        cumulative_filtering: true
    }
);

Solution

  • You have to upgrade your yadcf library to the lastest version because that feature was added in yadcf 0.8.9.beta.13 ,see relevant comment