mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-02-22 23:18:27 +01:00
Search term search will show empty folders too
- Char list did hide folders with 0 sub entities inside. This also applied to any search being done. Now when searching, if a tag/folder matches, it is shown, even if the chars inside don't match. Before that, it was not possible to "search" for tags without the "Advanced Character Search" enabled
This commit is contained in:
parent
d791b54528
commit
7b5baad5cd
@ -196,9 +196,10 @@ function filterByTagState(entities, { globalDisplayFilters = false, subForEntity
|
||||
return false;
|
||||
}
|
||||
|
||||
// Hide folders that have 0 visible sub entities after the first filtering round
|
||||
// Hide folders that have 0 visible sub entities after the first filtering round, unless we are inside a search via search term.
|
||||
// Then we want to display folders that mach too, even if the chars inside don't match the search.
|
||||
if (entity.type === 'tag') {
|
||||
return entity.entities.length > 0;
|
||||
return entity.entities.length > 0 || entitiesFilter.getFilterData(FILTER_TYPES.SEARCH);
|
||||
}
|
||||
|
||||
return true;
|
||||
|
Loading…
x
Reference in New Issue
Block a user