fixed article input

This commit is contained in:
Luca Haid
2025-05-20 11:22:14 +02:00
parent cf7874946d
commit 90987baec0

View File

@@ -195,6 +195,12 @@ Vue.component('tt-positions-manager',
this.$delete(this.formData, key);
}
if ((typeof field.showCondition === 'function' && field.showCondition(this.formData) === true || !field.showCondition) && field.type === 'input-article' && field.emitDisplayValue && (isNaN(this.formData[key]) || !this.formData[key]) && this.$refs['article-' + key][0]) {
console.log(this.$refs['article-' + key][0].$refs.autocomplete);
this.$set(this.formData, key + '_text', this.$refs['article-' + key][0].$refs.autocomplete.displayValue);
this.$delete(this.formData, key);
}
if (field.emitDisplayValue && this.formData[key] !== null && this.formData[key] !== undefined) {
this.$delete(this.formData, key + '_text');
}