Skip to content

Commit

Permalink
fix: Avoid closing the score filter when dragging the slider (#1822)
Browse files Browse the repository at this point in the history
* fix: Avoid closing the score filter when dragging the slider

This PR fixes the score filter selection, avoiding closing the score filter when dragging the slider outside of the filter content

see #1802

* replace undefined with null

* rename method
  • Loading branch information
leiyre committed Nov 15, 2022
1 parent 7858dc5 commit 91a72c5
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
Expand Up @@ -18,7 +18,10 @@
<template>
<div
ref="dropdownMenu"
v-click-outside="onClickOutside"
v-click-outside="{
events: ['mousedown'],
handler: onClickOutside,
}"
:class="[
'dropdown',
colorType === 'grey' ? '--grey' : '',
Expand Down
12 changes: 9 additions & 3 deletions frontend/components/commons/header/filters/FiltersList.vue
Expand Up @@ -16,7 +16,13 @@
-->

<template>
<div v-click-outside="close" class="filters">
<div
v-click-outside="{
events: ['mousedown'],
handler: close,
}"
class="filters"
>
<div class="filters__list">
<div v-for="group in groups" :key="group" class="filters__list__item">
<p
Expand Down Expand Up @@ -244,7 +250,7 @@ export default {
},
methods: {
close() {
this.initialVisibleGroup = undefined;
this.initialVisibleGroup = null;
},
itemsAppliedOnGroup(group) {
if (group === "Sort") {
Expand All @@ -258,7 +264,7 @@ export default {
},
selectGroup(group) {
if (this.initialVisibleGroup === group) {
this.initialVisibleGroup = undefined;
this.initialVisibleGroup = null;
} else {
this.initialVisibleGroup = group;
}
Expand Down

0 comments on commit 91a72c5

Please sign in to comment.