* Clear all filters
()
| 174 | * Clear all filters |
| 175 | */ |
| 176 | function clearFilters(): void { |
| 177 | selectedLanguage = null; |
| 178 | selectedTags = []; |
| 179 | |
| 180 | const languageSelect = document.getElementById( |
| 181 | "filter-language" |
| 182 | ) as HTMLSelectElement; |
| 183 | if (languageSelect) languageSelect.value = ""; |
| 184 | |
| 185 | // Clear Choices.js selection |
| 186 | if (tagChoices) { |
| 187 | tagChoices.removeActiveItems(); |
| 188 | } |
| 189 | |
| 190 | const searchInput = document.getElementById( |
| 191 | "search-input" |
| 192 | ) as HTMLInputElement; |
| 193 | if (searchInput) searchInput.value = ""; |
| 194 | |
| 195 | renderCookbooks(); |
| 196 | updateResultsCount(); |
| 197 | } |
| 198 | |
| 199 | /** |
| 200 | * Get filtered recipes |
nothing calls this directly
no test coverage detected