mirror of
https://github.com/willmiao/ComfyUI-Lora-Manager.git
synced 2026-03-24 14:42:11 -03:00
Enhance model deletion handling in UI: integrate virtual scroller updates and remove legacy UI card removal logic.
This commit is contained in:
@@ -28,8 +28,6 @@ export function showDeleteModal(filePath, modelType = 'lora') {
|
||||
export async function confirmDelete() {
|
||||
if (!pendingDeletePath) return;
|
||||
|
||||
const card = document.querySelector(`.lora-card[data-filepath="${pendingDeletePath}"]`);
|
||||
|
||||
try {
|
||||
// Use appropriate delete function based on model type
|
||||
if (pendingModelType === 'checkpoint') {
|
||||
@@ -37,10 +35,7 @@ export async function confirmDelete() {
|
||||
} else {
|
||||
await deleteLora(pendingDeletePath);
|
||||
}
|
||||
|
||||
if (card) {
|
||||
card.remove();
|
||||
}
|
||||
|
||||
closeDeleteModal();
|
||||
} catch (error) {
|
||||
console.error('Error deleting model:', error);
|
||||
|
||||
Reference in New Issue
Block a user