Skip to content

Commit

Permalink
CIF-2272 - Cannot close category filter accordion once it is open
Browse files Browse the repository at this point in the history
 * added unit test
  • Loading branch information
LSantha committed Aug 25, 2021
1 parent f99e725 commit fdccf1d
Show file tree
Hide file tree
Showing 2 changed files with 458 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class ProductCollection {
constructor(config) {
this._element = config.element;

let sortKeySelect = document.querySelector(ProductCollection.selectors.sortKey);
let sortKeySelect = this._element.querySelector(ProductCollection.selectors.sortKey);
if (sortKeySelect) {
sortKeySelect.addEventListener('change', () => this._applySortKey(sortKeySelect));
}
Expand All @@ -29,7 +29,7 @@ class ProductCollection {
loadMoreButton.addEventListener('click', () => this._loadMore(loadMoreButton));
}

let filters = document.querySelector(ProductCollection.selectors.filtersBody);
let filters = this._element.querySelector(ProductCollection.selectors.filtersBody);
if (filters) {
let selectedFilter = null;
filters.addEventListener('click', e => {
Expand Down
Loading

0 comments on commit fdccf1d

Please sign in to comment.