improve filter

This commit is contained in:
Davide Alberani 2018-01-23 23:16:04 +01:00
parent 1f9ae66df8
commit c23c74062f

11
dist/history.html vendored
View file

@ -71,13 +71,12 @@ var app = new Vue({
}); });
}, },
updateFilter: function() { updateFilter: function() {
if (this.show_empty) {
this.filtered_history = this.history;
return;
}
self = this; self = this;
this.filtered_history = _.filter(self.history, function(o) { this.filtered_history = _.filter(self.history, 'changes');
if (self.show_empty) {
return true;
}
return o.changes;
});
}, },
toggleShowEmpty: function() { toggleShowEmpty: function() {
this.updateFilter(); this.updateFilter();