Skip to content

Commit ef03177

Browse files
fix(FileUploader): prop file doesn't auto upload
Related to Geode-solutions/Vease#41
1 parent b1a2bc8 commit ef03177

File tree

2 files changed

+2
-8
lines changed

2 files changed

+2
-8
lines changed

components/FileUploader.vue

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
4545
const { multiple, accept } = toRefs(props)
4646
47-
const label = multiple ? "Please select file(s)" : "Please select a file"
47+
const label = multiple ? "Please select file(s) to import" : "Please select a file to import"
4848
const files = ref([])
4949
const loading = ref(false)
5050
const files_uploaded = ref(false)
@@ -81,7 +81,6 @@
8181
8282
if (props.files.length) {
8383
files.value = props.files
84-
upload_files()
8584
}
8685
8786
function clear() {

test/components/FileSelector.nuxt.test.js

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -88,11 +88,6 @@ describe("FileSelector.vue", async () => {
8888
})
8989

9090
await flushPromises()
91-
92-
expect(wrapper.emitted()).toHaveProperty("update_values")
93-
expect(wrapper.emitted().update_values).toHaveLength(1)
94-
expect(wrapper.emitted().update_values[0][0]).toEqual({
95-
files,
96-
})
91+
expect(wrapper.componentVM.files).toEqual(files)
9792
})
9893
})

0 commit comments

Comments
 (0)