ColumnFilterWidgets Plug-in
ColumnFilterWidgets Plug-in
Hi all,
I have an open source plugin to share: https://github.com/cyberhobo/ColumnFilterWidgets
I'm a little intimated by the prospect of keeping it up to date with the amazing DataTables library, but I guess some of you out there might want to help! Inspired by the column menu filtering example
http://datatables.net/release-datatables/examples/api/multi_filter_select.html
I wrote the ColumnFilterWidgets for DataTables 1.7.x to create a more powerful column-based menus that allow multiple delimited menu items in a table cell, and multiple selections. It powers the tables you can play with in the publications search refine area on the Congressional Hunger Center site:
http://www.hungercenter.org/subjects/advocacy-and-education/
I invite all to use and contribute to the code, though I'll have limited time to work on it myself.
I have an open source plugin to share: https://github.com/cyberhobo/ColumnFilterWidgets
I'm a little intimated by the prospect of keeping it up to date with the amazing DataTables library, but I guess some of you out there might want to help! Inspired by the column menu filtering example
http://datatables.net/release-datatables/examples/api/multi_filter_select.html
I wrote the ColumnFilterWidgets for DataTables 1.7.x to create a more powerful column-based menus that allow multiple delimited menu items in a table cell, and multiple selections. It powers the tables you can play with in the publications search refine area on the Congressional Hunger Center site:
http://www.hungercenter.org/subjects/advocacy-and-education/
I invite all to use and contribute to the code, though I'll have limited time to work on it myself.
This discussion has been closed.
Replies
Thanks very much for taking the time to release this as open source!
Regards,
Allan
For anyone interested, I encourage you to try the examples. This requires you to put the code in DataTabes/extras/ColumnFilterWidgets in a DataTables tree, then open the HTML examples.
if i may i would like to give a suggestion. your link to the hunger center provides an example that could be an improvement to the plugin. Do you think possible to create a parameter that, if true, instead of designing the column filters like you give in the example it could design them as in the page of hunger center?
anyway thks for a great plugin of a great plugin :)
Sorry I've not had a chance to look at your plug-in a more closely until now. I have to say you've done a fantastic job on integrating this into the DataTables "style" of presenting your examples and code! I really like the cumulative filtering feature, and the ability to remove a filter with a single click - really very nice!
I've just put up a link from the "extras" page to your plug-in ( http://datatables.net/extras/#ColumnFilterWidgets ) as I'm sure that the community will hugely appreciate your work on this. I've also cloned your git repo onto this server so that I could link directly to running examples (the "examples" link in the "Extras" table. If you would like the description or any other point changed, please do just let me know!
I wonder if I might make two suggestions for your plug-in:
1. Might it be possible to include a list of the options that are available for the plug-in in your readme and say what each one does? Just a central documentation point.
2. Did you consider adding an option for a "clear all" filters? If there are a lot of filters on the table, then this might be useful. *Edit* - I see that there is a reset button on your example web-page, is this in the plug-in and I just missed it?
Regards,
Allan
I've updated the README as suggested, and also linked to the new page.
For the clear all suggestion I created an issue: https://github.com/cyberhobo/ColumnFilterWidgets/issues/1
Thanks!
Regards,
Allan
https://github.com/cyberhobo/ColumnFilterWidgets/issues/2
Feel free to implement it!
Allan
DataTables holds an internal cache of the data, so it doesn't make any difference to the searching if the cell is visible or not, since it isn't directly looking at the DOM (which really would be slow).
Allan
Thanks!
I need this to provide for referring the page viewer to a specific set of records.
The problem is located in DataTables: fnGetData(iRow) function always returns all rows, and not the specified row.
Regards,
Allan
In file ColumnFilterWidgets.js
Line 115
From:
[code]if ( oColumn.bVisible && sExcludeList.indexOf( '|' + i + '|' ) < 0 ) {[/code]
To:
[code]if ( sExcludeList.indexOf( '|' + i + '|' ) < 0 ) {[/code]
Best regards, and thanks for the great plugin!
I want to built in my onlineshop a global productfilter.
The problem at the moment, if you change the page the filter reset to default.
Regards,
Markus
8
8,5
9
9,5
10
10,5
an so on
in the the select the order by is default and 10 comes before 8.
looks like
10
10,5
8
8,5
9
9,5
I can´t find a solution :-(
the table comes NOT out of erverside processing.
The problem with the order in the select is because is thinking of the values as strings. And also StateSave is not ready to deal with column filters, for that you must use the necessary funtions to had them inside the cookie.
joao noronha.
Regarding server-side processing, I'd suggest opening a feature request for the plug-in: https://github.com/cyberhobo/ColumnFilterWidgets/issues .
Allan
This widget is not able to filter columns with Images (i.e. columns having icons eg. 'Status' column).
Can it filter using 'alt' attribute?
but i can´t find a solution to fix the following problem:
the options of my select look like that
10
10,5
8
8,5
9
9,5
but i need
8
8,5
9
9,5
10
10,5
what can i do?