mirror of
https://github.com/directus/directus.git
synced 2026-04-25 03:00:53 -04:00
Fix empty image selection error for file-image interface (#18761)
* Fix empty image selection error for file-image interface * Add changeset * Update app/src/interfaces/file-image/file-image.vue --------- Co-authored-by: Brainslug <br41nslug@users.noreply.github.com> Co-authored-by: Rijk van Zanten <rijkvanzanten@me.com>
This commit is contained in:
5
.changeset/shaggy-mugs-kick.md
Normal file
5
.changeset/shaggy-mugs-kick.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@directus/app': patch
|
||||
---
|
||||
|
||||
Fixed empty image selection error for file-image interface
|
||||
@@ -80,7 +80,7 @@
|
||||
|
||||
<file-lightbox :id="image.id" v-model="lightboxActive" />
|
||||
</div>
|
||||
<v-upload v-else from-library from-url :from-user="createAllowed" :folder="folder" @input="update($event.id)" />
|
||||
<v-upload v-else from-library from-url :from-user="createAllowed" :folder="folder" @input="onUpload" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -185,6 +185,10 @@ async function imageErrorHandler() {
|
||||
}
|
||||
}
|
||||
|
||||
function onUpload(image: any) {
|
||||
if (image?.id) update(image.id);
|
||||
}
|
||||
|
||||
function deselect() {
|
||||
remove();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user