MCPcopy Index your code
hub / github.com/github/awesome-copilot / clearFilters

Function clearFilters

website/src/scripts/pages/samples.ts:176–197  ·  view source on GitHub ↗

* Clear all filters

()

Source from the content-addressed store, hash-verified

174 * Clear all filters
175 */
176function 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

Callers

nothing calls this directly

Calls 2

renderCookbooksFunction · 0.85
updateResultsCountFunction · 0.85

Tested by

no test coverage detected