Go to file
koalyptus aade342976
Merge pull request #696 from koalyptus/greenkeeper/eslint-5.16.0
Update eslint to the latest version 🚀
2019-04-08 16:22:18 +10:00
dist Fix clean-webpack-plugin usage as not backwards compatible 2019-03-27 13:49:35 +11:00
libs Added selection grid demo, removed old demos 2015-07-11 20:38:36 +10:00
src fix TableFilter table id generation with more robust uuid generator 2019-02-18 22:50:04 +11:00
static sticky headers enhancement 2018-08-26 11:56:51 +10:00
test prepare dist 2019-02-15 21:37:30 +11:00
.editorconfig Renamed long custom event names, added hashchange event 2016-03-16 18:08:26 +11:00
.esdoc.json Remove provate members from auto-generated documentation 2018-02-02 22:34:17 +11:00
.eslintrc upgrade various packages 2019-02-16 21:52:06 +11:00
.gitignore Added missing source maps 2016-12-24 23:55:31 +11:00
.travis.yml try name property in travis releases provider 2018-06-15 21:06:57 +10:00
CONTRIBUTING.md add donate badge 2018-08-08 21:15:10 +10:00
Gruntfile.js remove deployment to gh-pages, correct website url 2018-05-06 11:24:38 +10:00
LICENSE Fixed clear all filters functionality when linked filters is on 2015-10-17 19:49:38 +11:00
PULL_REQUEST_TEMPLATE.md update pr template 2018-03-03 10:51:29 +11:00
README.md add donate badge 2018-08-08 21:15:10 +10:00
index.js Added index.js 2016-09-07 21:37:22 +10:00
package-lock.json Update package-lock.json 2019-04-05 09:41:27 +11:00
package.json Update package.json 2019-04-02 20:53:29 +11:00
webpack.config.js Fix clean-webpack-plugin usage as not backwards compatible 2019-03-27 13:49:35 +11:00
webpack.dev.config.js convert var to const in webpack configs 2018-03-18 13:31:54 +11:00
webpack.test.config.js Fix clean-webpack-plugin usage as not backwards compatible 2019-03-27 13:49:35 +11:00

README.md

Build Status Document codecov Greenkeeper badge Donate

TableFilter

A Javascript library making HTML tables filterable

TableFilter is a modernised version of the HTML Table Filter generator javascript plugin. This library adds to any html table a "filter by column" feature that enables users to filter and limit the data displayed within a long table. By default, the script automatically adds a filter grid bar at the top of the desired table.

Features

  • Convert a regular HTML table into an advanced grid component providing:
    • Advanced columns filtering model
    • Sorting and pagination capabilities
    • Complete selection model (ezEditTable extension)
    • Extended keyboard navigation (ezEditTable extension)
    • Inline cell or row editing (ezEditTable extension)
    • Row insertion or deleting (ezEditTable extension)
    • And even more features...
  • Attach to an existing HTML table
  • Integration with any server-side technology as this is a pure client-side solution
  • Exhaustive documentation and poweful API

Getting started

  • Clone the repo using Git:
git clone https://github.com/koalyptus/TableFilter.git
  • You can download this repository.

  • TableFilter is available on npm repository, you can install it from the command line using the following command:

npm install tablefilter --save-dev
  • or get the future features from the next release channel:
npm install tablefilter@next --save-dev

Setup

Using modules

Require TableFilter:

// ES2015 modules
import TableFilter from 'tablefilter';

// CommonJS or AMD modules
var TableFilter = require('tablefilter');

Using distribution scripts

If you are not using a module system, you can reference the distribution scripts directly in your html pages:

<script src="path_to/node_modules/tablefilter/dist/tablefilter/tablefilter.js"></script>

Placing manually the distribution scripts in your project

Copy the tablefilter directory under dist and place it at desired location in your project. Then include the main js file in your page:

<script src="path/to/my/scripts/tablefilter/tablefilter.js"></script>

Usage

Place the following snippet just under the HTML table and always define a base_path property in the configuration object to reflect the path to the script

<script>
var tf = new TableFilter(document.querySelector('.my-table'), {
    base_path: 'path/to/my/scripts/tablefilter/'
});
tf.init();
</script>

If the base_path property is not specified, it will default to /tablefilter directory:

your-page.html
 |— tablefilter

Development

This project requires node.js and Grunt to be installed:

  • install node.js v8.9.4 or higher
  • install Grunt from the command line using npm (comes with node.js):
npm install -g grunt-cli

Once Grunt is sorted out you can follow the instructions below. Start by installing any dependencies.

npm install

Use

npm run dev

command to launch a build / watch cycle and start the local sever on port 8080.

Use

npm run build

command to generate a production build.

The

npm run dist

command will create a production build, run the tests and finally generate the demos:

To run all the tests and generate the coverage report:

npm test

or to run specific test(s):

grunt test-only:test.html
grunt test-only:test.html,test-sort.html

to view the coverage report(s), open the index.html under the report/coverage folder or online.

Demos

Check out the online examples or generate the demos locally:

npm run build:demos

then run the local webserver:

npm start

then pick a demo from:

http://localhost:8080/demos/

Documentation

Find exhaustive documentation on the configuration options in the WIKI section.

Autogenerated documentation of the ES6 modules is available on the website: docs

If you previously used the HTML Table Filter Generator plugin, verify the configuration options you are using are still supported: Obsolete

Run this task to generate the documentation in the docs/docs directory:

npm run esdoc

Support

License

MIT