This commit is contained in:
@@ -655,8 +655,19 @@ export default {
|
||||
filterItem.value,
|
||||
item.enumType
|
||||
);
|
||||
|
||||
//add only if not already in the collection (accidental double click)
|
||||
if (!window.$gz._.find(item.filter.items, filterItem)) {
|
||||
//de-lodash
|
||||
// if (!window.$gz._.find(item.filter.items, filterItem)) {
|
||||
|
||||
//some fits better here as it only test for truthiness and returns immediately on true
|
||||
//also the item is unique and display doesn't need to be compared for equality it's irrelevant
|
||||
//so only the op and the value need to be checked
|
||||
if (
|
||||
!item.filter.items.some(
|
||||
z => z.op == filterItem.op && z.value == filterItem.value
|
||||
)
|
||||
) {
|
||||
item.filter.items.push(filterItem);
|
||||
window.$gz.form.setFormState({
|
||||
vm: this,
|
||||
|
||||
Reference in New Issue
Block a user