nnhatnam / jquery-datatables-column-filter

Automatically exported from code.google.com/p/jquery-datatables-column-filter
0 stars 0 forks source link

Issue 37 is NOT fixed ("bVisible causes wrong columns to be used") #88

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Issue 37 is marked as fixed, but it's not fixed, and no one's reopening it.  So 
I'm opening a new one.
http://code.google.com/p/jquery-datatables-column-filter/issues/detail?id=37

Original issue reported on code.google.com by gbirchme...@connamara.com on 24 Aug 2012 at 2:20

GoogleCodeExporter commented 9 years ago
As of the latest version, I'm still seeing this issue.

Original comment by gbirchme...@connamara.com on 24 Aug 2012 at 2:23

GoogleCodeExporter commented 9 years ago
Just use bUseColVis: true...
http://code.google.com/p/jquery-datatables-column-filter/source/browse/trunk/col
Vis.html?r=55

Original comment by koblinge...@gmail.com on 10 Sep 2012 at 5:27

GoogleCodeExporter commented 9 years ago
Seems like it might work.

Is that documented anywhere?

Original comment by gbirchme...@connamara.com on 10 Sep 2012 at 5:53

GoogleCodeExporter commented 9 years ago
Hey guys, if anyone reads this, it might save you a big time using this pluggin:

"bUseColVis does not work"

Check your dataTables.columnFilter.js code, and search for 
_fnColumnIndex(iColumnIndex)

The fix is to inverse the if, to get it like that:
if (properties.bUseColVis)
                return oTable.fnSettings().oApi._fnVisibleToColumnIndex(oTable.fnSettings(), iColumnIndex);
            else
                return iColumnIndex;

In the first case does care about visibility and count even skipped (invisible) 
columns as it should.

Check it out :)

Original comment by birdsevo...@gmail.com on 31 May 2013 at 2:11

GoogleCodeExporter commented 9 years ago
I can confirm the above method by birdsevo got the desired results. Nice Find!

Simply change:

if (properties.bUseColVis)
  return iColumnIndex;
else
  return oTable.fnSettings().oApi._fnVisibleToColumnIndex(oTable.fnSettings(), iColumnIndex);

To:

if (properties.bUseColVis)
  return oTable.fnSettings().oApi._fnVisibleToColumnIndex(oTable.fnSettings(), iColumnIndex);
  else
return iColumnIndex;

Original comment by j...@5lime.com on 26 Jul 2013 at 7:46

GoogleCodeExporter commented 9 years ago
Worked for me too, big thanks!

Original comment by jlin...@dcidesigns.net on 18 Aug 2013 at 3:01

GoogleCodeExporter commented 9 years ago
Yes..This fix worked for me.

Original comment by gangadha...@gmail.com on 25 Nov 2013 at 1:19

GoogleCodeExporter commented 9 years ago
Thanks, "j...@5lime.com" your solution worked like a charm!

Original comment by renzos...@gmail.com on 30 Jan 2014 at 7:23

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Thanks man "j...@5lime.com", your solution is really working.

Original comment by ztdn3...@gmail.com on 9 Jun 2014 at 7:24

GoogleCodeExporter commented 9 years ago
Thanks so much for that  #4 birdsevo...@gmail.com !!!

Original comment by julien.h...@gmail.com on 7 Aug 2014 at 1:30