Go to file
koalyptus 400166fe5a
Update index.html
2019-04-01 12:59:16 +11:00
assets Generated by grunt gh-pages 2018-05-05 18:07:23 +10:00
docs Update index.html 2019-04-01 12:59:16 +11:00
tablefilter Delete tf-0-c51522970c2299de9dd8.js 2018-06-09 22:31:01 +10:00
0-configuration.html Update 0-configuration.html 2018-09-13 02:34:30 +10:00
LICENSE publish README to gh-pages (auto) 2018-05-05 08:19:43 +00:00
README.md publish README to gh-pages (auto) 2018-05-05 08:19:43 +00:00
advanced-grid-editable.html Update advanced-grid-editable.html 2018-09-17 19:04:57 +10:00
advanced-grid-selection.html Update advanced-grid-selection.html 2018-09-21 09:04:33 +10:00
alphabetical-pager.html Update alphabetical-pager.html 2018-09-25 00:45:30 +10:00
alternating-rows.html Update alternating-rows.html 2018-09-25 00:51:01 +10:00
auto-filter.html Update auto-filter.html 2018-09-14 17:26:39 +10:00
case-sensitive.html Update case-sensitive.html 2018-09-26 17:01:51 +10:00
column-calculations-api.html Update column-calculations-api.html 2018-10-11 11:04:06 +11:00
column-calculations.html Update column-calculations.html 2018-10-13 22:29:18 +11:00
column-widths.html Update column-widths.html 2018-10-15 12:21:19 +11:00
columns-visibility.html Update columns-visibility.html 2018-10-15 21:16:09 +11:00
conditional-cell-formatting.html Update conditional-cell-formatting.html 2018-10-18 21:19:35 +11:00
custom-checkbox-selection.html Update custom-checkbox-selection.html 2018-10-18 21:21:29 +11:00
custom-filter-options.html Update custom-filter-options.html 2018-10-18 21:22:52 +11:00
custom-filtering.html Update custom-filtering.html 2018-10-20 17:06:46 +11:00
data-types.html Update data-types.html 2018-10-21 21:49:11 +11:00
deep-linking.html Update deep-linking.html 2018-10-21 21:51:24 +11:00
dynamic-external-filters.html Update dynamic-external-filters.html 2018-10-25 16:59:39 +11:00
exact-match-by-column.html Update exact-match-by-column.html 2018-10-25 20:29:17 +11:00
exact-match.html Update exact-match.html 2018-10-27 22:42:20 +11:00
examples.html Update examples.html 2018-09-13 02:39:20 +10:00
extension-run-time.html Update extension-run-time.html 2018-10-28 19:53:24 +11:00
external-filter-operators.html Update external-filter-operators.html 2018-10-28 19:56:22 +11:00
external-filters.html Update external-filters.html 2018-10-29 21:40:45 +11:00
external-toolbar.html Update external-toolbar.html 2018-10-29 21:43:08 +11:00
extract-data-apis.html Update extract-data-apis.html 2018-10-30 20:20:32 +11:00
features-no-configuration.html Update features-no-configuration.html 2018-11-01 21:17:20 +11:00
filter-images.html Update filter-images.html 2018-11-02 13:23:35 +11:00
filter-types.html Update filter-types.html 2018-11-06 16:13:53 +11:00
filters-visibility-external-toggle.html Update filters-visibility-external-toggle.html 2018-11-07 13:27:17 +11:00
filters-visibility.html Update filters-visibility.html 2018-11-09 13:19:04 +11:00
grid-layout-custom-css.html Update grid-layout-custom-css.html 2018-11-12 12:58:19 +11:00
grid-layout.html Update grid-layout.html 2018-11-14 13:39:25 +11:00
grouped-headers.html Update grouped-headers.html 2018-11-15 20:19:13 +11:00
highlight-keywords.html Update highlight-keywords.html 2018-11-19 13:29:51 +11:00
ignore-diacritics-by-column.html Update ignore-diacritics-by-column.html 2018-11-19 13:30:41 +11:00
ignore-diacritics.html Update ignore-diacritics.html 2018-11-20 13:35:04 +11:00
index.html Update index.html 2018-09-13 02:38:05 +10:00
linked-filters-greyed-out-options.html Update linked-filters-greyed-out-options.html 2018-11-21 15:11:53 +11:00
linked-filters.html Update linked-filters.html 2018-09-14 17:38:15 +10:00
load-filters-on-demand.html Update load-filters-on-demand.html 2018-11-22 13:29:55 +11:00
multiple-state-types.html Update multiple-state-types.html 2018-11-26 13:35:49 +11:00
no-filters.html Update no-filters.html 2018-11-27 13:12:25 +11:00
no-headers.html Update no-headers.html 2018-11-29 13:36:26 +11:00
no-results-message.html Update no-results-message.html 2018-11-30 13:36:28 +11:00
paging.html Update paging.html 2018-12-03 13:06:40 +11:00
persistence.html Update persistence.html 2018-12-06 13:24:24 +11:00
popup-filters.html Update popup-filters.html 2018-12-07 15:08:03 +11:00
responsive-grid-layout.html Update responsive-grid-layout.html 2018-12-10 13:42:55 +11:00
responsive.html Update responsive.html 2018-12-11 12:52:44 +11:00
rows-always-visible.html Update rows-always-visible.html 2018-12-12 13:38:55 +11:00
setup-requirejs.html Update setup-requirejs.html 2018-12-13 13:46:22 +11:00
setup-systemjs.html Update setup-systemjs.html 2018-12-17 13:16:19 +11:00
single-filter-exclude-cols.html Update single-filter-exclude-cols.html 2018-12-20 13:20:29 +11:00
single-filter.html Update single-filter.html 2018-12-27 13:41:30 +11:00
sort-columns-external-command.html Update sort-columns-external-command.html 2018-12-28 13:45:50 +11:00
sort-custom-type.html Update sort-custom-type.html 2018-12-31 13:19:39 +11:00
sort.html Update sort.html 2019-01-02 12:15:40 +11:00
theme-roller.html Update theme-roller.html 2019-01-03 13:38:54 +11:00
toggle-features.html Update toggle-features.html 2019-01-07 13:21:50 +11:00
using-bootstrap.html Update using-bootstrap.html 2019-01-08 13:38:15 +11:00
using-material-design-lite.html Update using-material-design-lite.html 2019-01-09 13:27:22 +11:00
watermark.html Update watermark.html 2019-01-10 13:51:29 +11:00

README.md

Build Status Document codecov Greenkeeper badge

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