L Geo
L Geo

Reputation: 21

jQuery datatable yadcf column filter issue when column reorder is applied

I'm using jQuery datatable 1.10.16 and jquery.dataTables.yadcf.js 0.9.1. Below are my datatable functionalities,

  1. server side data
  2. SHow/Hide columns - colvis
  3. State Save and State Load in server side
  4. ColReorder
  5. Column filter (yadcf)

Column filter is NOT required for all the columns. It is required for few specific columns. Everything is working fine except, the column filter is not working for some fields after I do a column reordering. For eg:

dhboardtable = $('#table').DataTable({.....});

yadcf.init(dhboardtable, [
                    ...........
                   {
                      column_number: 11,
                      filter_type: "text",
                      filter_delay: 2000
                    },
                    {
                        column_number: 13,
                        filter_type: "text",
                        filter_delay: 2000
                    },
                    {
                      column_number: 14,
                      filter_type: "text",
                      filter_delay: 2000
                    }

Column index 12 does not need the filtering(as per requirement). So, I didn't have the column index 12 in the yadcf initialization. The issue is when I drag and drop (reorder) the column 14 (or any columns index > 12) to position it before column 12 (no filter column), then column 14 filter is not working.

Could someone please help with this issue? Thanks in advance.

Upvotes: 2

Views: 752

Answers (1)

Daniel
Daniel

Reputation: 37061

Grab the latest beta version of yadcf

in addition look at the showcase page of server side and set the "columns" property for the table and use stateSave": true.

it should work with the above setup

Upvotes: 0

Related Questions