Skip to content

Commit

Permalink
Fixed fast-pushing filters
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrey Helldar committed Oct 21, 2020
1 parent c35e96f commit 1c02c5a
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion resources/views/scripts.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@
this.filter.value = value;
} else {
if (! this.inArray(this.filter[key], value)) {
this.filter[key].push(value);
this.pushFilter(key, value);
}
}
},
Expand Down Expand Up @@ -283,6 +283,12 @@
return this.highlight(value, /(@.*)$/gi, '$&');
},
pushFilter(key, value) {
this.isEmptyValue(this.filter[key])
? this.filter[key] = [value]
: this.filter[key].push(value);
},
trans(key) {
return trans[key];
},
Expand Down

0 comments on commit 1c02c5a

Please sign in to comment.