fix(filters): close filter popup when clicking on show results
continuous-integration/drone/pr Build was killed Details

This commit is contained in:
kolaente 2024-03-09 20:08:00 +01:00
parent 4e6e0608c7
commit d628471d0e
Signed by: konrad
GPG Key ID: F40E70337AB24C9B
2 changed files with 8 additions and 2 deletions

View File

@ -26,6 +26,7 @@
:has-title="true" :has-title="true"
class="filter-popup" class="filter-popup"
@update:modelValue="emitChanges" @update:modelValue="emitChanges"
@showResultsButtonClicked="() => modalOpen = false"
/> />
</modal> </modal>
</template> </template>

View File

@ -27,7 +27,7 @@
> >
<x-button <x-button
variant="primary" variant="primary"
@click.prevent.stop="change()" @click.prevent.stop="changeAndEmitButton"
> >
{{ $t('filters.showResults') }} {{ $t('filters.showResults') }}
</x-button> </x-button>
@ -61,7 +61,7 @@ const {
modelValue: TaskFilterParams, modelValue: TaskFilterParams,
}>() }>()
const emit = defineEmits(['update:modelValue']) const emit = defineEmits(['update:modelValue', 'showResultsButtonClicked'])
const route = useRoute() const route = useRoute()
const projectId = computed(() => { const projectId = computed(() => {
@ -125,4 +125,9 @@ function change() {
emit('update:modelValue', newParams) emit('update:modelValue', newParams)
} }
function changeAndEmitButton() {
change()
emit('showResultsButtonClicked')
}
</script> </script>