Skip to content

Commit 1c02c5a

Browse files
author
Andrey Helldar
committed
Fixed fast-pushing filters
1 parent c35e96f commit 1c02c5a

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

resources/views/scripts.blade.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@
194194
this.filter.value = value;
195195
} else {
196196
if (! this.inArray(this.filter[key], value)) {
197-
this.filter[key].push(value);
197+
this.pushFilter(key, value);
198198
}
199199
}
200200
},
@@ -283,6 +283,12 @@
283283
return this.highlight(value, /(@.*)$/gi, '$&');
284284
},
285285
286+
pushFilter(key, value) {
287+
this.isEmptyValue(this.filter[key])
288+
? this.filter[key] = [value]
289+
: this.filter[key].push(value);
290+
},
291+
286292
trans(key) {
287293
return trans[key];
288294
},

0 commit comments

Comments
 (0)