Vue Filter Block
Bundle of several mixins and coomponents aimed to simplify
table sorting in vue.js applications. Take a look at the demo.
Features
- No duplication (you set filters only in template).
- State support (local storage). Version safe, extensible to multiple states.
- Throttling.
Installing
npm install vue-filter-block
Getting Started
As it's not a library, you don't have to install a thing.
Require the package:
var vueFilterBlock = require('vue-filter-block')
See the structure:
mixins
child
parent
components
filters
vmRemovableInputFilter
vmThreeStateCheckboxFilter
vmPaginatorFilter
vmSortingOrderFilter
other
vmThreeStateCheckbox
vmPaginator
vmFilterMixinTest
test
vmFilterMixinTest
vueFilterBlock.mixins.parent
is primary mixin for your parent
component.
Let's assume you have a table and you want to add
some filters on top of it. To sort by name and date, for instance.
The component for parent mixin is one that contains
both table and filters.
vueFilterBlock.mixins.child
is used for every filter in filters.
Take a look into components/filters for usage hints.
Prerequisities
Required npm packages:
Contributing
- Fork it!
- Create your feature branch:
git checkout -b my-new-feature
- Commit your changes:
git commit -am 'Add some feature'
- Push to the branch:
git push origin my-new-feature
- Submit a pull request.
History
- 15.04.2016: Initial commit
Credits
- Yauheni Prakopchyk - Asva
License
This project is licensed under the MIT License