mirror of
https://github.com/willmiao/ComfyUI-Lora-Manager.git
synced 2026-03-25 07:05:43 -03:00
fix(SearchManager): update search options handling to modify relevant fields instead of replacing the entire object, see #415
This commit is contained in:
@@ -284,26 +284,17 @@ export class SearchManager {
|
|||||||
// Update search options based on page type
|
// Update search options based on page type
|
||||||
if (pageState && pageState.searchOptions) {
|
if (pageState && pageState.searchOptions) {
|
||||||
if (this.currentPage === 'recipes') {
|
if (this.currentPage === 'recipes') {
|
||||||
pageState.searchOptions = {
|
// Update only the relevant fields in searchOptions instead of replacing the whole object
|
||||||
title: options.title || false,
|
pageState.searchOptions.title = options.title || false;
|
||||||
tags: options.tags || false,
|
pageState.searchOptions.tags = options.tags || false;
|
||||||
loraName: options.loraName || false,
|
pageState.searchOptions.loraName = options.loraName || false;
|
||||||
loraModel: options.loraModel || false
|
pageState.searchOptions.loraModel = options.loraModel || false;
|
||||||
};
|
} else if (this.currentPage === 'loras' || this.currentPage === 'checkpoints' || this.currentPage === 'embeddings') {
|
||||||
} else if (this.currentPage === 'loras' || this.currentPage === 'embeddings') {
|
// Update only the relevant fields in searchOptions instead of replacing the whole object
|
||||||
pageState.searchOptions = {
|
pageState.searchOptions.filename = options.filename || false;
|
||||||
filename: options.filename || false,
|
pageState.searchOptions.modelname = options.modelname || false;
|
||||||
modelname: options.modelname || false,
|
pageState.searchOptions.tags = options.tags || false;
|
||||||
tags: options.tags || false,
|
pageState.searchOptions.creator = options.creator || false;
|
||||||
creator: options.creator || false
|
|
||||||
};
|
|
||||||
} else if (this.currentPage === 'checkpoints') {
|
|
||||||
pageState.searchOptions = {
|
|
||||||
filename: options.filename || false,
|
|
||||||
modelname: options.modelname || false,
|
|
||||||
tags: options.tags || false,
|
|
||||||
creator: options.creator || false
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user