* Setup search functionality
()
| 156 | * Setup search functionality |
| 157 | */ |
| 158 | function setupSearch(): void { |
| 159 | const searchInput = document.getElementById( |
| 160 | "search-input" |
| 161 | ) as HTMLInputElement; |
| 162 | if (!searchInput) return; |
| 163 | |
| 164 | searchInput.addEventListener( |
| 165 | "input", |
| 166 | debounce(() => { |
| 167 | renderCookbooks(); |
| 168 | updateResultsCount(); |
| 169 | }, 200) |
| 170 | ); |
| 171 | } |
| 172 | |
| 173 | /** |
| 174 | * Clear all filters |
no test coverage detected