mirror of
https://github.com/willmiao/ComfyUI-Lora-Manager.git
synced 2026-06-09 20:39:25 -03:00
fix(recipe): prevent empty grid by removing preserveScroll from refresh triggers
Bug: when scrolling down on recipes page, any operation with preserveScroll: true would fetch only page 1 data then restore scroll position to beyond the loaded items, leaving the grid empty. Fix: - Remove preserveScroll: true from all 7 must-refresh trigger paths (filter, search, sort, import, settings reload, sync, rebuild cache, sidebar folder nav) - Replace full list refresh with updateSingleItem() for repair and bulk missing-LoRA download operations - Update tests to match new scroll-free behavior
This commit is contained in:
@@ -306,8 +306,14 @@ export class RecipeContextMenu extends BaseContextMenu {
|
||||
if (result.success) {
|
||||
if (result.repaired > 0) {
|
||||
showToast('recipes.contextMenu.repair.success', {}, 'success');
|
||||
// Refresh the current card or reload
|
||||
this.resetAndReload();
|
||||
const detailResponse = await fetch(`/api/lm/recipe/${recipeId}`);
|
||||
if (detailResponse.ok) {
|
||||
const updatedRecipe = await detailResponse.json();
|
||||
const filePath = this.currentCard?.dataset?.filepath;
|
||||
if (filePath && state.virtualScroller) {
|
||||
state.virtualScroller.updateSingleItem(filePath, updatedRecipe);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
showToast('recipes.contextMenu.repair.skipped', {}, 'info');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user