improve filter
This commit is contained in:
parent
1f9ae66df8
commit
c23c74062f
1 changed files with 5 additions and 6 deletions
11
dist/history.html
vendored
11
dist/history.html
vendored
|
@ -71,13 +71,12 @@ var app = new Vue({
|
|||
});
|
||||
},
|
||||
updateFilter: function() {
|
||||
self = this;
|
||||
this.filtered_history = _.filter(self.history, function(o) {
|
||||
if (self.show_empty) {
|
||||
return true;
|
||||
if (this.show_empty) {
|
||||
this.filtered_history = this.history;
|
||||
return;
|
||||
}
|
||||
return o.changes;
|
||||
});
|
||||
self = this;
|
||||
this.filtered_history = _.filter(self.history, 'changes');
|
||||
},
|
||||
toggleShowEmpty: function() {
|
||||
this.updateFilter();
|
||||
|
|
Loading…
Reference in a new issue