From 9b163d79c2fb2f5413d4d74e867bf03100b2e036 Mon Sep 17 00:00:00 2001 From: rijkvanzanten Date: Fri, 7 Aug 2020 17:19:32 -0400 Subject: [PATCH] Allow multiple new files to be uploaded in files interface --- app/src/interfaces/files/files.vue | 2 +- app/src/interfaces/many-to-many/use-preview.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/src/interfaces/files/files.vue b/app/src/interfaces/files/files.vue index 89ac2df000..85529fa975 100644 --- a/app/src/interfaces/files/files.vue +++ b/app/src/interfaces/files/files.vue @@ -59,7 +59,7 @@ {{ $t('upload_file') }} - + {{ $t('done') }} diff --git a/app/src/interfaces/many-to-many/use-preview.ts b/app/src/interfaces/many-to-many/use-preview.ts index a7016699d5..4bd6620aaa 100644 --- a/app/src/interfaces/many-to-many/use-preview.ts +++ b/app/src/interfaces/many-to-many/use-preview.ts @@ -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, }, });