jQuery plugin for an Excel-like table filter dropdown with search, sort and checkboxes
Switch branches/tags
Nothing to show
Clone or download
chestercharles Merge pull request #9 from egens/master
Add localisation and dropdown customization.
Latest commit 4a88f70 Jan 23, 2018

README.adoc

Excel Bootstrap Table Filter jQuery Plugin

A jQuery plugin to generate an excel-flavored table-filter.

Calendar
Figure 1. Excel Table Filter Example

Usage

  1. Install the dependencies by running: npm install.

  2. Build the project by running: npm run build.

  3. Add dist/checkbox-dropdown-plugin.min.js and dist/checkbox-dropdown-style.css to you project

  4. Render the dropdown to a #table and pass an (optional) configuration object:

        $('#table').excelTableFilter({
            columnSelector: '.apply-filter',    // (optional) if present, will only select <th> with specified class
            sort: true,                         // (optional) default true
            search: true                        // (optional) default true
            captions: Object                    // (optional) default { a_to_z: 'A to Z', z_to_a: 'Z to A', search: 'Search', select_all: 'Select All' }
        });
    . Add 'no-sort', 'no-filter' or 'no-search' to <th> element to customize its dropdown.

Support

This plugin uses some methods like Array.prototype.map, Array.prototype.reduce, Array.prototype.indexOf that may need a polyfill in IE.