Unverified Commit c6578078 authored by davelopez's avatar davelopez
Browse files

Fix import all datasets from library folder

Pass the total number of rows as limit, since using limit=0 is not valid anymore for consistency.
parent 591f36c4
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -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;
+4 −3
Original line number Diff line number Diff line
@@ -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();