folder: preserve query during navigation

Signed-off-by: Varun Patil <radialapps@gmail.com>
pull/900/head
Varun Patil 2023-10-29 11:03:20 -07:00
parent b2e179ff43
commit a305ddc4ad
2 changed files with 4 additions and 8 deletions

View File

@ -55,12 +55,8 @@ export default defineComponent({
path = path.split('/');
}
return {
name: this.$route.name,
params: {
path: [...path, this.data.name],
},
};
path = [...path, this.data.name]; // intentional copy
return { ...this.$route, params: { path } };
},
previews(): IPhoto[] {

View File

@ -1,7 +1,7 @@
<template>
<div class="top-matter">
<NcBreadcrumbs>
<NcBreadcrumb :title="rootFolderName" :to="{ name: $route.name }">
<NcBreadcrumb :title="rootFolderName" :to="{ ...$route, params: { path: [] } }">
<template #icon>
<template v-if="routeIsPublic">
<ShareIcon :size="20" />
@ -16,7 +16,7 @@
v-for="folder in list"
:key="folder.idx"
:title="folder.text"
:to="{ name: $route.name, params: { path: folder.path } }"
:to="{ ...$route, params: { path: folder.path } }"
/>
</NcBreadcrumbs>