cyberhobo / ColumnFilterWidgets

This is an add-on for the DataTables plugin for jQuery that creates filtering widgets based on the data in table columns.
69 stars 34 forks source link

Add option to preselect one or many filter values, so the table loads already filtered #27

Open AltiusRupert opened 10 years ago

AltiusRupert commented 10 years ago

Unlike oTable.fnFilter('value', colNumber), I want this to appear as if a column had be filtered manually, which the user then has the option to change (by removing this filter or adding others).

This will help accelerate loading large data sets, I hope.

cyberhobo commented 10 years ago

I think the whole table is loaded regardless before filtering. You could test this independently of ColumnFilterWidgets with an initial search:

$(document).ready( function() {
  $('#example').dataTable( {
    "oSearch": {"sSearch": "Initial search"}
  } );
} )
NicoFerna commented 10 years ago

I believe this would be a valuable add-on. Would make it possible to pre-filter based on a user's preferences (for example) but still give the option for the user to remove that filter.