Move event emitter before async function call so it will hopefully trigger the change event on the parent component earlier.
Update this.changed inside if statement because it should only be updated if the file is successfully uploaded.
This commit is contained in:
parent
699176fc91
commit
2f5ad6b38b
@ -58,18 +58,18 @@ export default {
|
||||
this.$refs.attachmentFilename.value = file.name
|
||||
this.$refs.attachmentObjectName.value = response.objectName
|
||||
this.$refs.attachmentInput.disabled = true
|
||||
emitFieldChange(this)
|
||||
this.changed = true
|
||||
|
||||
this.downloadLink = await this.getDownloadLink(
|
||||
file.name,
|
||||
response.objectName
|
||||
)
|
||||
} else {
|
||||
emitFieldChange(this)
|
||||
this.changed = true
|
||||
this.uploadError = true
|
||||
}
|
||||
|
||||
this.changed = true
|
||||
|
||||
emitFieldChange(this)
|
||||
},
|
||||
removeAttachment: function(e) {
|
||||
e.preventDefault()
|
||||
|
Loading…
x
Reference in New Issue
Block a user