diff --git a/static/js/managers/FilterManager.js b/static/js/managers/FilterManager.js index 1b8956c8..9af4d58e 100644 --- a/static/js/managers/FilterManager.js +++ b/static/js/managers/FilterManager.js @@ -599,7 +599,7 @@ export class FilterManager { // Call the appropriate manager's load method based on page type if (this.currentPage === 'recipes' && window.recipeManager) { - await window.recipeManager.loadRecipes(true); + await window.recipeManager.loadRecipes({ preserveScroll: true }); } else if (this.currentPage === 'loras' || this.currentPage === 'embeddings' || this.currentPage === 'checkpoints') { // For models page, reset the page and reload await getModelApiClient().loadMoreWithVirtualScroll(true, false); @@ -682,7 +682,7 @@ export class FilterManager { // Reload data using the appropriate method for the current page if (this.currentPage === 'recipes' && window.recipeManager) { - await window.recipeManager.loadRecipes(true); + await window.recipeManager.loadRecipes({ preserveScroll: true }); } else if (this.currentPage === 'loras' || this.currentPage === 'checkpoints' || this.currentPage === 'embeddings') { await getModelApiClient().loadMoreWithVirtualScroll(true, true); } diff --git a/static/js/managers/SearchManager.js b/static/js/managers/SearchManager.js index 60c0f28a..8796878f 100644 --- a/static/js/managers/SearchManager.js +++ b/static/js/managers/SearchManager.js @@ -301,7 +301,7 @@ export class SearchManager { // Call the appropriate manager's load method based on page type if (this.currentPage === 'recipes' && window.recipeManager) { - window.recipeManager.loadRecipes(true); // true to reset pagination + window.recipeManager.loadRecipes({ preserveScroll: true }); } else if (this.currentPage === 'loras' || this.currentPage === 'embeddings' || this.currentPage === 'checkpoints') { // For models page, reset the page and reload getModelApiClient().loadMoreWithVirtualScroll(true, false); diff --git a/static/js/managers/SettingsManager.js b/static/js/managers/SettingsManager.js index 11b091a0..b531ebca 100644 --- a/static/js/managers/SettingsManager.js +++ b/static/js/managers/SettingsManager.js @@ -2863,7 +2863,7 @@ export class SettingsManager { await resetAndReload(false); } else if (this.currentPage === 'recipes') { // Reload the recipes without updating folders - await window.recipeManager.loadRecipes(); + await window.recipeManager.loadRecipes({ preserveScroll: true }); } else if (this.currentPage === 'checkpoints') { // Reload the checkpoints without updating folders await resetAndReload(false); diff --git a/static/js/recipes.js b/static/js/recipes.js index 76e79854..68d5719b 100644 --- a/static/js/recipes.js +++ b/static/js/recipes.js @@ -19,7 +19,7 @@ class RecipePageControls { } async resetAndReload() { - refreshVirtualScroll(); + await refreshVirtualScroll({ preserveScroll: true }); } async refreshModels(fullRebuild = false) {