Skip to content
This repository was archived by the owner on Feb 17, 2019. It is now read-only.
This repository was archived by the owner on Feb 17, 2019. It is now read-only.

Add a Callback and Two New Options #12

@jdmdigital

Description

@jdmdigital

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions