Skip to content

Commit

Permalink
Merge pull request galaxyproject#18687 from davelopez/24.0_fix_import…
Browse files Browse the repository at this point in the history
…_all_datasets_from_library

[24.0] Fix import all datasets from library folder
  • Loading branch information
mvdbeek authored Aug 13, 2024
2 parents 591f36c + c657807 commit b48a49f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -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;
Expand Down
7 changes: 4 additions & 3 deletions client/src/components/Libraries/LibraryFolder/services.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit b48a49f

Please sign in to comment.