Allow multiple new files to be uploaded in files interface

This commit is contained in:
rijkvanzanten
2020-08-07 17:19:32 -04:00
parent 69d6ad32fc
commit 9b163d79c2
2 changed files with 3 additions and 3 deletions

View File

@@ -59,7 +59,7 @@
<v-dialog v-model="showUpload">
<v-card>
<v-card-title>{{ $t('upload_file') }}</v-card-title>
<v-card-text><v-upload @upload="onUpload" /></v-card-text>
<v-card-text><v-upload @upload="onUpload" multiple /></v-card-text>
<v-card-actions>
<v-button @click="showUpload = false">{{ $t('done') }}</v-button>
</v-card-actions>

View File

@@ -42,7 +42,7 @@ export default function usePreview({
// Every time the value changes, we'll reset the preview values. This ensures that we'll
// almost show the most up to date information in the preview table, regardless of if this
// is the first load or a subsequent edit.
watch(value, setPreview);
watch(value, setPreview, { immediate: true });
return { loading, previewItems, error };
@@ -127,7 +127,7 @@ export default function usePreview({
const response = await api.get(`/items/${junctionTable}`, {
params: {
fields: adjustFieldsForDisplay(fieldsToFetch, junctionCollection.value),
[`filter[${currentInJunction}][eq]`]: primaryKey.value,
[`filter[${currentInJunction}][_eq]`]: primaryKey.value,
},
});