Skip to content

Commit

Permalink
fix(file-uploader): update emitted values at clear & onItemRemove
Browse files Browse the repository at this point in the history
- onItemRemove had 'this.internalFiles' as emitted value instead of
'internalFiles.value'
- clear had 'internalFiles' instead of 'internalFiles.value'
  • Loading branch information
felipebritor committed Sep 19, 2023
1 parent 6298294 commit 25ef2f4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/CvFileUploader/CvFileUploader.vue
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ function onDragEvent(evt) {
function onItemRemove(index) {
internalFiles.value.splice(index, 1);
emit('update:modelValue', this.internalFiles);
emit('update:modelValue', internalFiles.value);
}
function onKeyHit() {
Expand All @@ -298,7 +298,7 @@ defineExpose({
},
clear() {
internalFiles.value = [];
emit('update:modelValue', internalFiles);
emit('update:modelValue', internalFiles.value);
},
setInvalidMessage(index, message) {
internalFiles.value[index].invalidMessage = message;
Expand Down

0 comments on commit 25ef2f4

Please sign in to comment.