Skip to content

Commit 6d6111f

Browse files
committed
apply filter border if filter applied in browse,search,history
1 parent 7f2e36b commit 6d6111f

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

frontend/src/components/shared/FilterSliderDropdown.vue

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<template>
22
<!-- eslint-disable max-len -->
33
<div class="focus:outline-none ml-2 flex-1 sm:flex-none" @focusout="close" tabindex="1">
4-
<div v-bind:class="{'filter-button': true, 'border-gray-matcha': !closed}" @click="toggle">
4+
<div v-bind:class="{'filter-button': true, 'border-gray-matcha': !closed || currentRange !== slider.startRange}" @click="toggle">
55
<h1 v-bind:class="{ 'opacity-50': closed, 'noSelect': true, 'capitalize': true }">{{name}}</h1>
66
</div>
77
<div ref="sliderDropdown" v-bind:class="{'slider-dropdown': true, 'hidden': closed}">
@@ -31,8 +31,14 @@ export default {
3131
max: null,
3232
start: null,
3333
step: 1,
34+
startRange: null,
3435
},
3536
}),
37+
computed: {
38+
currentRange() {
39+
return this.slider.startMax - this.slider.startMin;
40+
},
41+
},
3642
methods: {
3743
toggle() {
3844
this.closed = !this.closed;
@@ -57,6 +63,7 @@ export default {
5763
if (this.slider.min === this.slider.max) {
5864
this.slider.max += 1;
5965
}
66+
this.slider.startRange = this.slider.startMax - this.slider.startMin;
6067
noUiSlider.create(this.$refs.slider, {
6168
start: [this.slider.startMin, this.slider.startMax],
6269
step: this.slider.step,

frontend/src/components/shared/MultipleFiltersDropdown.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<template>
22
<!-- eslint-disable max-len -->
33
<div class="focus:outline-none ml-2 flex-1 sm:flex-none" @focusout="close" tabindex="0">
4-
<div v-bind:class="{'filter-button': true, 'border-gray-matcha': !closed}" @click="toggle">
4+
<div v-bind:class="{'filter-button': true, 'border-gray-matcha': !closed || (!startingOptions && selectedFilters.length)}" @click="toggle">
55
<h1 v-bind:class="{ 'opacity-50': closed, 'noSelect': true, 'capitalize': true }">
66
{{name}}</h1>
77
</div>

0 commit comments

Comments
 (0)