1

http://yadcf-showcase.appspot.com/cumulative_filtering.html

If you begin with selecting "Tag 5" in the last column, the first column is not filtered to the only remaining selections (you get all values as selectable)

Is this a one way cumulative? (col1 first, then col2 then col3), or should the cumulative affect all other columns in the process forward and backward?

test case link here - https://jsfiddle.net/myc05td2/

Select Tab 2 in the last column, and Some Data 11 is still available in the first column.

Or, select Tab11 and you will see that it should only list Some Data 11 in the first column, but it shows all items in column 1

Kender
  • 1,191
  • 3
  • 15
  • 34
  • seems like a bug, cause if you check the fourth column, you'll see that its values are reduced properly unlike the first column filter – Daniel Apr 27 '23 at 07:51
  • has been reported in git, but their rules say to also report here so I did... hopefully it will be fixed – Kender Apr 27 '23 at 17:32
  • Actually I prefer questions to be asked on SO only, and bug to be reported on GitHub, in this case I'm still not 100% sure if its a bug, anyway, please post a link to jsfiddle so I can check what went wrong there, p.s, I'm the author of the plugin – Daniel Apr 30 '23 at 07:22
  • 1
    @Daniel also provided the link in github - https://jsfiddle.net/myc05td2/ – Kender May 01 '23 at 13:52

1 Answers1

1

Found out the reason,

You had an explicit cumulative_filtering: false for the first column, while the global was set to true.

Once I removed that explicit false, the problem was solved

{
    column_number : 0,
    filter_type: "multi_select",
    select_type: 'select2',
    cumulative_filtering: false
}, 

jsfiddle sample: https://jsfiddle.net/vedmack/2aLntwkf/

Here is the complete code:

var oTable;

$(document).ready(function () {
    'use strict';

    
    oTable = $('#example').DataTable();
    
    yadcf.init(oTable,
        [
            {
                column_number : 0,
                filter_type: "multi_select",
                select_type: 'select2'
            }, 
            {
                column_number: 3,
                filter_type: "auto_complete",
                text_data_delimiter: ","
            },
            {
                column_number : 4,
                filter_type: "multi_select",
                select_type: 'select2',
                column_data_type: "html",
                html_data_type: "text",
                filter_default_label: "Select tag"
            }
        ],
        {
            cumulative_filtering: true
        }
    );
});
Daniel
  • 36,833
  • 10
  • 119
  • 200