diff --git a/client/src/components/FilesDialog/FilesDialog.vue b/client/src/components/FilesDialog/FilesDialog.vue index 1fb89ae29130..5e6d2bde46e3 100644 --- a/client/src/components/FilesDialog/FilesDialog.vue +++ b/client/src/components/FilesDialog/FilesDialog.vue @@ -409,6 +409,7 @@ onMounted(() => { :is-busy="isBusy" :items="items" :items-provider="itemsProvider" + :provider-url="currentDirectory?.url" :total-items="totalItems" :modal-show="modalShow" :modal-static="modalStatic" diff --git a/client/src/components/SelectionDialog/SelectionDialog.vue b/client/src/components/SelectionDialog/SelectionDialog.vue index c3958b198003..ea501a759411 100644 --- a/client/src/components/SelectionDialog/SelectionDialog.vue +++ b/client/src/components/SelectionDialog/SelectionDialog.vue @@ -27,6 +27,7 @@ interface Props { isEncoded?: boolean; items?: SelectionItem[]; itemsProvider?: ItemsProvider; + providerUrl?: string; totalItems?: number; leafIcon?: string; modalShow?: boolean; @@ -48,6 +49,7 @@ const props = withDefaults(defineProps(), { isEncoded: false, items: () => [], itemsProvider: undefined, + providerUrl: undefined, totalItems: 0, leafIcon: "fa fa-file-o", modalShow: true, @@ -127,6 +129,16 @@ watch( filtered(props.items); } ); + +watch( + () => props.providerUrl, + () => { + // We need to reset the current page when drilling down sub-folders + if (props.itemsProvider !== undefined) { + currentPage.value = 1; + } + } +);