Multi column sorting directive for smart table
npm install st-multi-sortA multi-column sorting directive for Smart Table. It works just like stSort, but also supports:
- stable sort - clicking another column preserves the previous sort order when possible
- shift click sorting - shift or ctrl clicking a column adds that column as a secondary sort
[![build status][travis-badge]][travis-link]
[![npm version][npm-badge]][npm-link]
[![MIT license][license-badge]][license-link]
[![we're hiring][hiring-badge]][hiring-link]
Simply use st-multi-sort instead of st-sort.
``html`
Name
Age
...
Note, if you want to support shift clicking, I recommend you add this CSS to prevent the text from highlighting on click:
`css`
[st-multi-sort] {
-webkit-touch-callout: none;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
cursor: pointer;
}
Please follow our Code of Conduct
when contributing to this project.
```
$ git clone https://github.com/goodeggs/st-multi-sort && cd st-multi-sort
$ npm install
$ npm test
_Module scaffold generated by generator-goodeggs-npm._
[travis-badge]: http://img.shields.io/travis/goodeggs/st-multi-sort.svg?style=flat-square
[travis-link]: https://travis-ci.org/goodeggs/st-multi-sort
[npm-badge]: http://img.shields.io/npm/v/st-multi-sort.svg?style=flat-square
[npm-link]: https://www.npmjs.org/package/st-multi-sort
[license-badge]: http://img.shields.io/badge/license-MIT-blue.svg?style=flat-square
[license-link]: LICENSE.md
[hiring-badge]: https://img.shields.io/badge/we're_hiring-yes-brightgreen.svg?style=flat-square
[hiring-link]: http://goodeggs.jobscore.com/?detail=Open+Source&sid=161