Merge pull request #3274 from SillyTavern/search-term-empty-folders Search term search will show empty folders too
Signed| @@ -196,9 +196,10 @@ function filterByTagState(entities, { globalDisplayFilters = false, subForEntity | ||
| 196 | 196 | return false; |
| 197 | 197 | } |
| 198 | 198 | |
| 199 | 199 | // Hide folders that have 0 visible sub entities after the first filtering round, unless we are inside a search via search term. |
| 200 | + // Then we want to display folders that mach too, even if the chars inside don't match the search. | |
| 200 | 201 | if (entity.type === 'tag') { |
| 201 | 202 | return entity.entities.length > 0 || entitiesFilter.getFilterData(FILTER_TYPES.SEARCH); |
| 202 | 203 | } |
| 203 | 204 | |
| 204 | 205 | return true; |