diff --git a/client/src/components/Libraries/LibraryFolder/TopToolbar/FolderTopBar.vue b/client/src/components/Libraries/LibraryFolder/TopToolbar/FolderTopBar.vue index cfdd97f1c429..41353ebb30d0 100644 --- a/client/src/components/Libraries/LibraryFolder/TopToolbar/FolderTopBar.vue +++ b/client/src/components/Libraries/LibraryFolder/TopToolbar/FolderTopBar.vue @@ -210,6 +210,9 @@ export default { // logic from legacy code return !!(this.contains_file_or_folder && Galaxy.user); }, + totalRows: function () { + return this.metadata?.total_rows ?? 0; + }, }, created() { const Galaxy = getGalaxyInstance(); @@ -241,7 +244,8 @@ export default { const selected = await this.services.getFilteredFolderContents( this.folder_id, this.unselected, - this.$parent.searchText + this.$parent.searchText, + this.totalRows ); this.$emit("setBusy", false); return selected; diff --git a/client/src/components/Libraries/LibraryFolder/services.js b/client/src/components/Libraries/LibraryFolder/services.js index 7b59d871bbde..c94c76135eeb 100644 --- a/client/src/components/Libraries/LibraryFolder/services.js +++ b/client/src/components/Libraries/LibraryFolder/services.js @@ -30,12 +30,13 @@ export class Services { } } - async getFilteredFolderContents(id, excluded, searchText) { + async getFilteredFolderContents(id, excluded, searchText, limit) { // The intent of this method is to get folder contents applying - // seachText filters only; we explicitly set limit to 0 + // seachText filters only; limit should match the total number of + // items in the folder, so that all items are returned. const config = { params: { - limit: 0, + limit, }, }; searchText = searchText?.trim();