https://github.com/lifeart/ember-hell-filters
This is an filters group EmberJS addon
https://github.com/lifeart/ember-hell-filters
ember-addon ember-cli-addon filters inputs multiselect-elements
Last synced: about 1 year ago
JSON representation
This is an filters group EmberJS addon
- Host: GitHub
- URL: https://github.com/lifeart/ember-hell-filters
- Owner: lifeart
- License: mit
- Created: 2016-09-09T09:57:12.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2018-07-07T18:52:22.000Z (almost 8 years ago)
- Last Synced: 2024-12-21T09:27:11.980Z (over 1 year ago)
- Topics: ember-addon, ember-cli-addon, filters, inputs, multiselect-elements
- Language: JavaScript
- Size: 421 KB
- Stars: 3
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Ember-hell-filters
This README outlines the details of collaborating on this Ember addon.
## DEMO
[https://lifeart.github.io/ember-hell-filters/demo/](https://lifeart.github.io/ember-hell-filters/demo/)
## Example
In template:
```
{{#filters-group filters=filters values=(hash one=1 two=2) filtersDidChange=(action 'reloadPlots') }}
```
In component:
```
Component.extend({
filters: Ember.computed(function() {
let store = this.get('store');
return [{
componentName: 'hell-filters/select-2',
name: 'one',
config: {
idKey: 'id',
multiple: true,
textKey: 'full_name',
options: Ember.computed(function() {
return store.peekAll('user');
}),
}
}, {
componentName: 'hell-filters/select-2',
name: 'two',
dependsOn: {
name: 'one',
value: '@any'
},
config: {
idKey: 'id',
multiple: true,
textKey: 'full_name',
options: Ember.computed(function() {
return store.peekAll('user').filterBy('role', 3);
}),
}
},
];
}),
actions: {
reloadPlots: function(filtersState) {
console.log(filtersState);
}
}
});
```
Installation
------------------------------------------------------------------------------
* `git clone ` this repository
* `cd ember-hell-filters`
* `npm install`
### Linting
* `npm run lint:js`
* `npm run lint:js -- --fix`
### Running tests
* `ember test` – Runs the test suite on the current Ember version
* `ember test --server` – Runs the test suite in "watch mode"
* `ember try:each` – Runs the test suite against multiple Ember versions
### Running the dummy application
* `ember serve`
* Visit the dummy application at [http://localhost:4200](http://localhost:4200).
For more information on using ember-cli, visit [https://ember-cli.com/](https://ember-cli.com/).
License
------------------------------------------------------------------------------
This project is licensed under the [MIT License](LICENSE.md).