From 7bd88b9d462903ae7753b9ef7a3613ebcd9bad45 Mon Sep 17 00:00:00 2001
From: pacien
Date: Fri, 25 Jun 2021 12:09:30 +0200
Subject: viewer/GalleryNavigation: uniquely identify viewer instances by item

This forces viewer components to be re-instantiated on item change.

GitHub: fixes #268
---
 viewer/src/views/GalleryNavigation.vue | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'viewer/src/views/GalleryNavigation.vue')

diff --git a/viewer/src/views/GalleryNavigation.vue b/viewer/src/views/GalleryNavigation.vue
index fd1f19a..c53df66 100644
--- a/viewer/src/views/GalleryNavigation.vue
+++ b/viewer/src/views/GalleryNavigation.vue
@@ -21,7 +21,7 @@
   <div>
     <ld-error v-if="isError" icon="folder-open" :message="$t('gallery.unknown-resource')" />
     <gallery-search v-else-if="isSearch" :path="path" />
-    <component :is="componentName" v-else :item="$galleryStore.currentItem" />
+    <component :is="componentName" v-else :key="$galleryStore.currentItem.path" :item="$galleryStore.currentItem" />
   </div>
 </template>
 
-- 
cgit v1.2.3

