mirror of
https://github.com/Spythere/stacjownik.git
synced 2026-05-03 21:38:13 +00:00
fix: filters double click
This commit is contained in:
@@ -63,16 +63,15 @@
|
|||||||
<div class="section-filters">
|
<div class="section-filters">
|
||||||
<label
|
<label
|
||||||
v-for="filterKey in sectionFilters"
|
v-for="filterKey in sectionFilters"
|
||||||
@click="() => (filters[filterKey] = !filters[filterKey])"
|
|
||||||
@dblclick="setSingleSectionFilter(sectionKey, filterKey)"
|
@dblclick="setSingleSectionFilter(sectionKey, filterKey)"
|
||||||
:for="filterKey"
|
|
||||||
>
|
>
|
||||||
<input
|
<input
|
||||||
|
type="checkbox"
|
||||||
:checked="filters[filterKey]"
|
:checked="filters[filterKey]"
|
||||||
v-model="filters[filterKey]"
|
v-model="filters[filterKey]"
|
||||||
type="checkbox"
|
|
||||||
:class="sectionKey"
|
:class="sectionKey"
|
||||||
:name="filterKey"
|
:name="filterKey"
|
||||||
|
:id="filterKey"
|
||||||
/>
|
/>
|
||||||
<span>
|
<span>
|
||||||
{{ $t(`filters.${filterKey}`) }}
|
{{ $t(`filters.${filterKey}`) }}
|
||||||
@@ -363,7 +362,8 @@ export default defineComponent({
|
|||||||
|
|
||||||
setSingleSectionFilter(sectionKey: StationFilterSection, chosenKey: string) {
|
setSingleSectionFilter(sectionKey: StationFilterSection, chosenKey: string) {
|
||||||
filtersSections[sectionKey].forEach((filterKey) => {
|
filtersSections[sectionKey].forEach((filterKey) => {
|
||||||
if (filterKey != chosenKey) this.filters[filterKey] = initFilters[filterKey];
|
if (typeof this.filters[filterKey] === 'boolean')
|
||||||
|
this.filters[filterKey] = filterKey != chosenKey;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user