fix(filter): preserve search term through filter apply/clear operations

This commit is contained in:
Will Miao
2026-07-26 16:49:57 +08:00
parent f49b4ba4db
commit d9fcb0e92b

View File

@@ -984,6 +984,7 @@ export class FilterManager {
}
cloneFilters() {
const pageState = getCurrentPageState();
return {
...this.filters,
baseModel: [...(this.filters.baseModel || [])],
@@ -991,7 +992,8 @@ export class FilterManager {
autoTags: { ...(this.filters.autoTags || {}) },
license: { ...(this.filters.license || {}) },
modelTypes: [...(this.filters.modelTypes || [])],
tagLogic: this.filters.tagLogic || 'any'
tagLogic: this.filters.tagLogic || 'any',
search: this.filters.search || pageState?.filters?.search || ''
};
}