Update filters clear button functionality

This commit is contained in:
Matt-Yorkley
2020-04-21 11:45:38 +02:00
parent 9eaf55f4c0
commit ebe00bdc31
2 changed files with 4 additions and 1 deletions

View File

@@ -85,6 +85,9 @@ Darkswarm.controller "ProductsCtrl", ($scope, $filter, $rootScope, Products, Ord
$scope.clearAll = ->
$scope.query = ""
$scope.clearFilters()
$scope.clearFilters = ->
$scope.taxonSelectors.clearAll()
$scope.propertySelectors.clearAll()

View File

@@ -52,7 +52,7 @@
= render partial: "shop/products/filters"
.sidebar-footer
%button{type: 'button', ng: {click: 'clearAll() && toggleFilterSidebar()'}}
%button{type: 'button', ng: {click: 'clearFilters()'}}
= t(:products_filter_clear)
%button.done{type: 'button', ng: {click: 'toggleFilterSidebar()'}}
= t(:products_filter_done)