GithubHelp home page GithubHelp logo

rbayliss / dropdown-table-filter Goto Github PK

View Code? Open in Web Editor NEW
65.0 65.0 40.0 119 KB

A jQuery plugin providing simple dropdown filters for table columns.

Home Page: http://rbayliss.net/jquery-dropdown-table-filter

License: GNU General Public License v2.0

JavaScript 100.00%

dropdown-table-filter's People

Contributors

andrewkharook avatar rbayliss avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dropdown-table-filter's Issues

Sticky Headers

Would you be able to add an option for making the table header sticky? I tried a few plugins but they are not compatible with yours.

Mike

Add a Callback and Two New Options

I like the idea of adding a callback to the plugin as well as two new options:

firstOptionText - the first select option label text. Could be something like "All" or default to how it works now.

headingClass - Option for adding a class to the column heading for floating, styling, or just hiding. Defaults to how it works now, i.e. style="display:none;"

The use case for the callback might be something like the following where we want to filter and then add-up all the filtered rows:

$('.filter-table').ddTableFilter(filteroptions, function() {
var sum = addColumns(); // pretend that f(x) sums visible column data
$('.filter-table tfoot th:nth-child(n+1)').text(sum);
});

I created a branch called "Small-Edits", but I don't have permission to publish it--which is cool. I've attached a raw text version here for your (manual) review. Or, you could let me publish my branch and make a pull request. Totally up to you. Just trying to be helpful.

ddtf.txt

Very nicely done, by the way!

exclude certain rows?? also, limit size and range select option

hey

i know too many request, but yours is a perfect, sleek way to sort table.

is it possible to exclude certain rows from the dropdown filter.
i have an application which has hidden rows beneath a row, which comes in to view when onClick.
is it possible to hide those hidden rows appearing in the dropdown value.

also, is it possible to limit height/size of the dropdown. for eg,total 10, show 5 elements and scroll for rest.
and anyway to add option to sort column up and down inside dropdown.
how to add price range slider, if you have a price column.

thanks

colspan breaks plugin

Hi,

Nice work!
But when using a table with a colspan in the th, the dropdowns will have incorrect values for the next s or the dropdowns won't appear at all.
For now I just fixed it by removing the colspan and adding some empty th-tags.

Would be nice to see a solution.

Thanks!

Default filter

Dear,

Is it possible to set a default column filter ?

Rgds,

Add Skip Filter to documentation

To skip a column add the class Skip-Filter to the column header.

The functionality exists and works correctly, but the documentation does not.

It's possible to filter numerical values

If you just change the sort slightly then you can handle numerical values in order rather than the sort by text. This was a real problem for me for someone so thought I would share it with you.

sortOptCallback: function(a, b) {
if( a == b) return 0;
var anum = parseInt(a.val,10);
var bnum = parseInt(b.val,10);
if( isNaN(anum) || isNaN(bnum)) {
return a.text.toLowerCase() > b.text.toLowerCase() ? 1 : -1;
}
return anum > bnum ? 1 : -1;
},

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.