Added the Reset Filter button

This commit is contained in:
2026-02-23 23:44:27 -08:00
parent 8f865c6f39
commit 15e73c8576

View File

@@ -111,6 +111,7 @@ header p{font-size:0.85rem;color:#f0cca0;margin-top:3px}
<option value="both">Both Picked</option> <option value="both">Both Picked</option>
<option value="either">Either Picked</option> <option value="either">Either Picked</option>
</select> </select>
<button class="btn btn-outline" onclick="resetFilters()">Clear Filters</button>
<div class="spacer"></div> <div class="spacer"></div>
<span class="tag-counts" id="tagCounts"></span> <span class="tag-counts" id="tagCounts"></span>
<button class="btn btn-outline" onclick="clearAll()">Clear All</button> <button class="btn btn-outline" onclick="clearAll()">Clear All</button>
@@ -225,6 +226,14 @@ function clearAll(){
localStorage.setItem('irw_interests',JSON.stringify(interests)); localStorage.setItem('irw_interests',JSON.stringify(interests));
renderList(); updateCounts(); renderList(); updateCounts();
} }
function resetFilters(){
document.getElementById('search').value='';
document.getElementById('filterPrice').value='';
document.getElementById('filterArea').value='';
document.getElementById('filterCuisine').value='';
document.getElementById('filterInterest').value='';
applyFilters();
}
function showDetail(slug){ function showDetail(slug){
activeSlug=slug; activeSlug=slug;