Skip to content

Commit

Permalink
Fix button IDs
Browse files Browse the repository at this point in the history
  • Loading branch information
megastary committed Oct 25, 2023
1 parent 85943bd commit 9db2e10
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
1 change: 0 additions & 1 deletion public/javascripts/category_filter.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ const filterCategories = new Map()

function filter_categories(category) {
if (!filterCategories.get(category)) {
console.log('Adding new category to map')
const elementsToHide = []
document
.querySelectorAll(`[data-category]:not([data-category="${category}"])`)
Expand Down
4 changes: 2 additions & 2 deletions views/shop/shop.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
</div>
{{#each categories}}
<div class="col mb-3">
<input type="radio" class="btn-check" name="product-filter" id="drinks" autocomplete="off" onclick="filter_categories('{{this._id}}')">
<label class="form-control btn btn-outline-primary" for="drinks"><i style="color: {{this.color}}" class="fa-solid fa-circle"></i> {{this.name}}</label>
<input type="radio" class="btn-check" name="product-filter" id="{{this._id}}" autocomplete="off" onclick="filter_categories('{{this._id}}')">
<label class="form-control btn btn-outline-primary" for="{{this._id}}"><i style="color: {{this.color}}" class="fa-solid fa-circle"></i> {{this.name}}</label>
</div>
{{/each}}
</div>
Expand Down

0 comments on commit 9db2e10

Please sign in to comment.