mtsampath / jquery-datatables-column-filter

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

Column-filter doesn't work after reinitialise #119

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Generate a datatables + column-filter
2. remove the datatables (the dom object)
3. regenerate the datatables + column-filter 

What is the expected output? What do you see instead?
You don't see a difference.

What version of the product are you using? On what operating system?
I'm using version 1.5.0 on Mac OSX, browser: Chrome.

Please provide any additional information below.
This is error is thrown:

Uncaught TypeError: Cannot read property 'oApi' of null 
jquery.dataTables.columnFilter.js:93
_fnColumnIndex jquery.dataTables.columnFilter.js:93
(anonymous function) jquery.dataTables.columnFilter.js:210
_fnFilterCustom jquery.dataTables.js:2207
_fnFilterComplete jquery.dataTables.js:2170
_fnSort jquery.dataTables.js:4099
fnInnerSorting jquery.dataTables.js:4202
(anonymous function) jquery.dataTables.js:4207
(anonymous function) jquery.dataTables.js:4799
v.event.dispatch jquery.min.js:2
o.handle.u

I think it has something to do with the used events. They are still active when 
I remove the dom and they can't find the object which they are bind to because 
i removed it.

Original issue reported on code.google.com by maxime.v...@gmail.com on 22 Apr 2013 at 8:08

GoogleCodeExporter commented 9 years ago
I was getting the same issue. Didn't do much debugging, but I was able to get 
something working (for now).

I changed the _fnColumnIndex function (the one raising the error) to always 
return iColumnIndex and it fixed the problem.

Original comment by kyle.con...@rigor.com on 23 May 2013 at 8:50

GoogleCodeExporter commented 9 years ago
Had the exact same issue. Thanks a lot Kyle :-)

Original comment by NaeemulH...@gmail.com on 16 Mar 2014 at 12:55