Giter VIP home page Giter VIP logo

filterable's Introduction

Filterable - UNSUPPORTED

Build Status

UNSUPPORTED

I no longer support this project, it is very out of date and will be even more out of date when Bootstrap 4 is out of beta. If someone wants to update the project - please submit pull request and I'll merged them.

Bootstrap and X-editable themed jQuery plugin that preforms per-column filtering for an HTML table.

Demo

http://lightswitch05.github.io/filterable

Usage

  • Filterable requires both Bootstrap and X-editable. To be able to change the color of the bootstrap icons, use the Font Awesome Icons inplace of the default ones.

       <link href="http://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/css/bootstrap-combined.no-icons.min.css" rel="stylesheet">
       <link href="http://netdna.bootstrapcdn.com/font-awesome/3.1.1/css/font-awesome.min.css" rel="stylesheet">
       <link href="http://cdnjs.cloudflare.com/ajax/libs/x-editable/1.4.5/bootstrap-editable/css/bootstrap-editable.css" rel="stylesheet">
       <script src="http://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/js/bootstrap.min.js"></script>
       <script src="http://cdnjs.cloudflare.com/ajax/libs/x-editable/1.4.5/bootstrap-editable/js/bootstrap-editable.min.js"></script>
  • To use Filterable, just select the table that you want to use and call filterable on it.

    • $('#exampleTable').filterable();
  • To override any default options, just pass a hash of options to Filterable. This example makes filterable case-sensitive.

    • $('#exampleTable').filterable({ignoreCase: false});

Options

  • ignoreColumns
    • Column indexes to not make filterable
    • Type: Array
    • Default: []
  • onlyColumns
    • Column indexes to make filterable, all other columns are left non-filterable.
    • Type: Array
    • This takes presidence over ignoreColumns when provided.
    • Default: null - all columns
  • ignoreCase
    • If case should be ignored
    • Type: Boolean
    • Default: true
  • isMatch($cell, query)
    • Custom function to determine if the cell matches the user supplied filter
    • Type: Function
    • Default: null
  • editableOptions
    • Any custom options for X-editable
    • Type: Object
    • Defaults: {}
  • editableSelector
    • Selector to use on each heading to define the x-editable object. If not supplied, the enire heading is used.
    • Type: String
    • Defaults: null
  • beforeFilter
    • Function to call before filtering a column
    • Type: Function
    • Defaults: null
  • afterFilter
    • Function to call after filtering a column
    • Type: Function
    • Defaults: null

filterable's People

Contributors

sid1029 avatar lightswitch05 avatar nickl- avatar

Watchers

James Cloos avatar

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.