mirror of
https://github.com/ArthurDanjou/artsite.git
synced 2026-01-14 15:54:13 +01:00
Extract clearFilters function for better maintainability
Co-authored-by: ArthurDanjou <29738535+ArthurDanjou@users.noreply.github.com>
This commit is contained in:
@@ -52,6 +52,11 @@ function toggleTag(tag: string) {
|
||||
selectedTags.value.push(tag)
|
||||
}
|
||||
}
|
||||
|
||||
function clearFilters() {
|
||||
selectedStatus.value = null
|
||||
selectedTags.value = []
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@@ -208,7 +213,7 @@ function toggleTag(tag: string) {
|
||||
</p>
|
||||
<UButton
|
||||
class="mt-4"
|
||||
@click="selectedStatus = null; selectedTags = []"
|
||||
@click="clearFilters"
|
||||
>
|
||||
Clear Filters
|
||||
</UButton>
|
||||
|
||||
Reference in New Issue
Block a user