FixedHeader collide with DataTables Column Filter
FixedHeader collide with DataTables Column Filter
slano
Posts: 3Questions: 0Answers: 0
Hi,
FixedHeader plugin is colliding with DataTables Column Filter plugin (http://jquery-datatables-column-filter.googlecode.com/svn/trunk/index.html), when Column Filter is placed in the thead section of the DataTables table. Everytime there is some action on the filter fields (input into input element, or select on the selectbox), filtering on the table is being performed, but immediately, _fnCloneThead is called, replacing the FixedHeader thead with the default one, loosing the data in input/select boxes.
I tried modifying the function _fnCloneThead to only perfom cloning once (if nTable.childNodes.length = 0) which makes the filtering working properly, but when sorting the table the class of is not changed (it's changed only on the original thead which is hidden, not on the thead cloned by FixedHeader), therefore the sorting arrows are not displayed/refreshed properly.
Is there any way to modify FixedHeader to insert the actual status of input/select boxes from thead when performing a clone?
I can create a simple example and upload it somewhere when the description is unclear. Thanks for any help.
FixedHeader plugin is colliding with DataTables Column Filter plugin (http://jquery-datatables-column-filter.googlecode.com/svn/trunk/index.html), when Column Filter is placed in the thead section of the DataTables table. Everytime there is some action on the filter fields (input into input element, or select on the selectbox), filtering on the table is being performed, but immediately, _fnCloneThead is called, replacing the FixedHeader thead with the default one, loosing the data in input/select boxes.
I tried modifying the function _fnCloneThead to only perfom cloning once (if nTable.childNodes.length = 0) which makes the filtering working properly, but when sorting the table the class of is not changed (it's changed only on the original thead which is hidden, not on the thead cloned by FixedHeader), therefore the sorting arrows are not displayed/refreshed properly.
Is there any way to modify FixedHeader to insert the actual status of input/select boxes from thead when performing a clone?
I can create a simple example and upload it somewhere when the description is unclear. Thanks for any help.
This discussion has been closed.
Replies
Allan
[code]
$(window).resize( function () {
FixedHeader.fnMeasure();
that._fnUpdateClones.call(that);
that._fnUpdatePositions.call(that);
} );
[/code]
is in the code. However, that does mean the filtering will be nuked, since the header elements will be cloned again... So back to square 1.
Have you considered using the y-scrolling feature built into DataTables? I suspect you'll find that much easier to integrate with column filtering.
Allan