mirror of
https://github.com/willmiao/ComfyUI-Lora-Manager.git
synced 2026-08-06 14:10:13 -03:00
Merge pull request #1044 from d1udiu/fix-filter
fix(filters): prevent search query from being persisted in localStorage
This commit is contained in:
@@ -729,10 +729,12 @@ export class FilterManager {
|
||||
const pageState = getCurrentPageState();
|
||||
const storageKey = `${this.currentPage}_filters`;
|
||||
|
||||
// Save filters to localStorage (exclude EMPTY_WILDCARD_MARKER)
|
||||
// Save filters to localStorage (exclude EMPTY_WILDCARD_MARKER and transient search)
|
||||
const filtersSnapshot = this.cloneFilters();
|
||||
// Don't persist EMPTY_WILDCARD_MARKER - it's a runtime-only marker
|
||||
filtersSnapshot.baseModel = filtersSnapshot.baseModel.filter(m => m !== EMPTY_WILDCARD_MARKER);
|
||||
// Don't persist search - it's transient and managed by SearchManager
|
||||
delete filtersSnapshot.search;
|
||||
setStorageItem(storageKey, filtersSnapshot);
|
||||
|
||||
// Update state with current filters
|
||||
@@ -993,7 +995,7 @@ export class FilterManager {
|
||||
license: { ...(this.filters.license || {}) },
|
||||
modelTypes: [...(this.filters.modelTypes || [])],
|
||||
tagLogic: this.filters.tagLogic || 'any',
|
||||
search: this.filters.search || pageState?.filters?.search || ''
|
||||
search: pageState?.filters?.search ?? ''
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user