Finishes removing all events of sendingValuesToTags from filters #576
This commit is contained in:
parent
2ac91054db
commit
03cb056172
|
@ -149,12 +149,6 @@
|
||||||
} else {
|
} else {
|
||||||
this.label = '';
|
this.label = '';
|
||||||
this.selected = '';
|
this.selected = '';
|
||||||
this.$emit('input', {
|
|
||||||
filter: 'autocomplete',
|
|
||||||
metadatum_id: this.metadatumId,
|
|
||||||
collection_id: this.collectionId,
|
|
||||||
value: this.selected
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
}, 500),
|
}, 500),
|
||||||
searchMore: _.debounce(function () {
|
searchMore: _.debounce(function () {
|
||||||
|
@ -176,12 +170,9 @@
|
||||||
|
|
||||||
axios.get(endpoint)
|
axios.get(endpoint)
|
||||||
.then( res => {
|
.then( res => {
|
||||||
|
|
||||||
let item = res.data;
|
let item = res.data;
|
||||||
this.label = item.title;
|
this.label = item.title;
|
||||||
this.selected = item.title;
|
this.selected = item.title;
|
||||||
|
|
||||||
this.$emit( 'sendValuesToTags', { label: this.label, value: this.selected, metadatumName: this.metadatumName });
|
|
||||||
})
|
})
|
||||||
.catch(error => {
|
.catch(error => {
|
||||||
this.$console.log(error);
|
this.$console.log(error);
|
||||||
|
@ -189,7 +180,6 @@
|
||||||
} else {
|
} else {
|
||||||
this.label = metadata.value;
|
this.label = metadata.value;
|
||||||
this.selected = metadata.value;
|
this.selected = metadata.value;
|
||||||
this.$emit( 'sendValuesToTags', { label: this.label, value: this.selected, metadatumName: this.metadatumName });
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
this.label = '';
|
this.label = '';
|
||||||
|
|
|
@ -53,7 +53,6 @@
|
||||||
});
|
});
|
||||||
this.valueEnd = null;
|
this.valueEnd = null;
|
||||||
this.valueInit = null;
|
this.valueInit = null;
|
||||||
this.$emit('sendValuesToTags', { label: '', value: null, metadatumName: this.metadatumName });
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// emit the operation for listeners
|
// emit the operation for listeners
|
||||||
|
@ -67,11 +66,6 @@
|
||||||
collection_id: this.collectionId,
|
collection_id: this.collectionId,
|
||||||
value: values
|
value: values
|
||||||
});
|
});
|
||||||
|
|
||||||
if (values[0] != undefined && values[1] != undefined && this.selectedInterval !== '') {
|
|
||||||
let labelValue = this.filterTypeOptions.intervals[this.selectedInterval].label + (this.filterTypeOptions.showIntervalOnTag ? ` (${values[0]}-${values[1]})` : '');
|
|
||||||
this.$emit('sendValuesToTags', { label: labelValue, value: values, metadatumName: this.metadatumName });
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
updateSelectedValues(){
|
updateSelectedValues(){
|
||||||
if ( !this.query || !this.query.metaquery || !Array.isArray( this.query.metaquery ) )
|
if ( !this.query || !this.query.metaquery || !Array.isArray( this.query.metaquery ) )
|
||||||
|
@ -95,10 +89,6 @@
|
||||||
);
|
);
|
||||||
this.selectedInterval = this.selectedInterval >= 0 ? this.selectedInterval : '';
|
this.selectedInterval = this.selectedInterval >= 0 ? this.selectedInterval : '';
|
||||||
|
|
||||||
if (this.selectedInterval !== '') {
|
|
||||||
let labelValue = this.filterTypeOptions.intervals[this.selectedInterval].label + (this.filterTypeOptions.showIntervalOnTag ? ` (${this.valueInit}-${this.valueEnd})` : '');
|
|
||||||
this.$emit('sendValuesToTags', { label: labelValue, value: [ this.valueInit, this.valueEnd ], metadatumName: this.metadatumName });
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
this.valueInit = null;
|
this.valueInit = null;
|
||||||
this.valueEnd = null;
|
this.valueEnd = null;
|
||||||
|
|
Loading…
Reference in New Issue