FIX: better handling of category filter deselection (#7468)
This commit is contained in:
parent
d5c9ac7196
commit
75591664e7
|
@ -207,6 +207,7 @@ export default Ember.Component.extend({
|
||||||
|
|
||||||
refreshReport() {
|
refreshReport() {
|
||||||
this.attrs.onRefresh({
|
this.attrs.onRefresh({
|
||||||
|
type: this.get("model.type"),
|
||||||
startDate: this.get("startDate"),
|
startDate: this.get("startDate"),
|
||||||
endDate: this.get("endDate"),
|
endDate: this.get("endDate"),
|
||||||
filters: this.get("filters.customFilters")
|
filters: this.get("filters.customFilters")
|
||||||
|
|
|
@ -10,5 +10,11 @@ export default FilterComponent.extend({
|
||||||
@computed("filter.default")
|
@computed("filter.default")
|
||||||
category(categoryId) {
|
category(categoryId) {
|
||||||
return Category.findById(categoryId);
|
return Category.findById(categoryId);
|
||||||
|
},
|
||||||
|
|
||||||
|
actions: {
|
||||||
|
onDeselect() {
|
||||||
|
this.applyFilter(this.get("filter.id"), undefined);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -3,4 +3,5 @@
|
||||||
value=category
|
value=category
|
||||||
castInteger=true
|
castInteger=true
|
||||||
onSelectNone=(action "onChange")
|
onSelectNone=(action "onChange")
|
||||||
|
onDeselect=(action "onDeselect")
|
||||||
onSelect=(action "onChange")}}
|
onSelect=(action "onChange")}}
|
||||||
|
|
Loading…
Reference in New Issue