This README outlines the details of collaborating on this Ember addon.
https://lifeart.github.io/ember-hell-filters/demo/
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);
}
}
});
git clone <repository-url>
this repositorycd ember-hell-filters
npm install
npm run lint:js
npm run lint:js -- --fix
ember test
– Runs the test suite on the current Ember versionember test --server
– Runs the test suite in "watch mode"ember try:each
– Runs the test suite against multiple Ember versions
ember serve
- Visit the dummy application at http://localhost:4200.
For more information on using ember-cli, visit https://ember-cli.com/.
This project is licensed under the MIT License.