Hi
Been using your plugin for a while now, I really like it (including the users).
Today the users ran into an issue:
- Type search in some column filter (say column 8, the result from the search would be 3 rows)
- Hide a column (say column 1)
- Clear the filter (instead of getting the full resultset the resultset stays with the same 3 rows)
If you show column 1 and clear the filter they get the full dataset.
I inspected the post request that is made to the server, the field for the column 8 is not cleared in this case.
The snippet I use:
Cheers
Flakron
Been using your plugin for a while now, I really like it (including the users).
Today the users ran into an issue:
- Type search in some column filter (say column 8, the result from the search would be 3 rows)
- Hide a column (say column 1)
- Clear the filter (instead of getting the full resultset the resultset stays with the same 3 rows)
If you show column 1 and clear the filter they get the full dataset.
I inspected the post request that is made to the server, the field for the column 8 is not cleared in this case.
The snippet I use:
oTable = $("#filter_table").dataTable({ "sDom": '<"top"<"clear">iflp<"clear">C<"clear">rt>rt<"bottom"iflp<"clear">>', "bJQueryUI": false, "bStateSave": false, "oColVis": { "buttonText": "Show / hide columns", "bRestore": true, "sAlign": "left" }, "aaSorting": [ [11,'desc'] ], "oLanguage": { "sLengthMenu": 'Display <select>'+ '<option value="10">10</option>'+ '<option value="20">20</option>'+ '<option value="30">30</option>'+ '<option value="40">40</option>'+ '<option value="50">50</option>'+ '<option value="-1">All</option>'+ '</select> records' }, "bProcessing": true, "bServerSide": true, "sAjaxSource": "<?php echo site_url() . '/filter/ajax_filter/' . $rig_id; ?>", "fnServerData": function ( sSource, aoData, fnCallback ) { $.ajax({ "dataType": 'json', "type": "POST", "url": sSource, "data": aoData, "success": fnCallback, "cache": false }); } }); $("thead input").keyup( function () { /* Filter on the column (the index) of this element */ oTable.fnFilter( this.value, $("thead input").index(this) ); } ); /* * Support functions to provide a little bit of 'user friendlyness' to the textboxes in * the footer */ $("thead input").each( function (i) { asInitVals[i] = this.value; } ); $("thead input").focus( function () { if ( this.className == "search_init" ) { this.className = ""; this.value = ""; } } ); $("thead input").blur( function (i) { if ( this.value == "" ) { this.className = "search_init"; this.value = asInitVals[$("thead input").index(this)]; } } );
Cheers
Flakron