From d628471d0e488d97bf1b584cae48d46e073b0d58 Mon Sep 17 00:00:00 2001 From: kolaente Date: Sat, 9 Mar 2024 20:08:00 +0100 Subject: [PATCH] fix(filters): close filter popup when clicking on show results --- .../src/components/project/partials/filter-popup.vue | 1 + frontend/src/components/project/partials/filters.vue | 9 +++++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/frontend/src/components/project/partials/filter-popup.vue b/frontend/src/components/project/partials/filter-popup.vue index 1238ee9b1..4c4d3eb5c 100644 --- a/frontend/src/components/project/partials/filter-popup.vue +++ b/frontend/src/components/project/partials/filter-popup.vue @@ -26,6 +26,7 @@ :has-title="true" class="filter-popup" @update:modelValue="emitChanges" + @showResultsButtonClicked="() => modalOpen = false" /> diff --git a/frontend/src/components/project/partials/filters.vue b/frontend/src/components/project/partials/filters.vue index 837b23d41..7b5b87418 100644 --- a/frontend/src/components/project/partials/filters.vue +++ b/frontend/src/components/project/partials/filters.vue @@ -27,7 +27,7 @@ > {{ $t('filters.showResults') }} @@ -61,7 +61,7 @@ const { modelValue: TaskFilterParams, }>() -const emit = defineEmits(['update:modelValue']) +const emit = defineEmits(['update:modelValue', 'showResultsButtonClicked']) const route = useRoute() const projectId = computed(() => { @@ -125,4 +125,9 @@ function change() { emit('update:modelValue', newParams) } + +function changeAndEmitButton() { + change() + emit('showResultsButtonClicked') +}