An element providing a solution to show a table and sort the columns.
Update to Polymer 1.0 and added some tests of the example Sortable Table with Polymer Web Components.
http://felixzapata.github.io/sortable-table/
Element dependencies are managed via Bower. You can install that via:
npm install -g bower
If you want to use the Gulp tasks inside this project, you should Gulp first:
npm install -g gulp
If you wish to work on your element in isolation, we recommend that you use Polyserve to keep your element's bower dependencies in line. You can install it via:
npm install -g polyserve
And you can run it via:
polyserve
Once running, you can preview your element at
http://localhost:8080/components/sortable-table/
, where sortable-table
is the name of the directory containing it.
There are two tasks that can be run for this project: lint and watch.
To use this tasks you must install the node modules inside package.json
file:
npm install
Running this will execute a JSHint and JSCS analysis to the JavaScript code inside HTML files.
To run this task:
gulp lint
It uses the preset rules for Airbnb. Overrides the rules:
- disallowQuotedKeysInObjects: set to false
- requireLineFeedAtFileEnd: removed
Simply navigate to the /test
directory of your element to run its tests. If
you are using Polyserve: http://localhost:8080/components/sortable-table/test/
The tests are compatible with web-component-tester. Install it via:
npm install -g web-component-tester
Then, you can run your tests on all of your local browsers via:
wct
wct -l chrome
will only run tests in chrome.
wct -p
will keep the browsers alive after test runs (refresh to re-run).
wct test/some-file.html
will test only the files you specify.
- Add a class to set the order type when the user click in the button.
- Review the accessibility when the column order changed.