Skip to content

Commit

Permalink
FFWEB-3333: Fix price slider filter closing
Browse files Browse the repository at this point in the history
Fix price slider filter closing
  • Loading branch information
Rayn93 authored Feb 24, 2025
1 parent 40e2a6a commit a519d71
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
### Fix
- Fix Proxy issue on PDP and for tracking requests
- Handle ClientException for SSR (invalid credentials, API issue etc.)
- Fix price slider filter closing

## [v5.2.2] - 2024.10.09
### Improve
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions src/Resources/app/storefront/src/plugin/asn-plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,17 @@ export default class AsnPlugin extends Plugin

_handleToggleFilter(event) {
const getAllGroupsExceptClicked = e => {
const clickedGroup = e.target.closest('ff-asn-group');
const clickedGroup = e.target.closest('ff-asn-group, ff-asn-group-slider');

return [...document.querySelectorAll('ff-asn-group')].filter(g => g !== clickedGroup)
return [...document.querySelectorAll('ff-asn-group, ff-asn-group-slider')].filter(g => g !== clickedGroup)
}

const isAsnGroup = e => {
return this._eventPath(e).find(p => p.tagName === 'ff-asn-group'.toUpperCase());
}
return this._eventPath(e).find(p => p.tagName === 'ff-asn-group'.toUpperCase()
|| p.tagName === 'ff-asn-group-slider'.toUpperCase()); }

if (!isAsnGroup(event)) {
document.querySelectorAll('ff-asn-group').forEach(g => {
document.querySelectorAll('ff-asn-group, ff-asn-group-slider').forEach(g => {
if (g.opened) g.toggle(true);
})
}
Expand Down
1 change: 0 additions & 1 deletion src/Resources/app/storefront/src/scss/_asn.scss
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@ ff-asn {
}

ff-slider {
background: $sw-color-brand-primary;
margin: 0 15px 24px;

.ffw-sliderBar {
Expand Down

0 comments on commit a519d71

Please sign in to comment.