mirror of
https://github.com/ArthurDanjou/artsite.git
synced 2026-02-02 09:31:31 +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)
|
selectedTags.value.push(tag)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function clearFilters() {
|
||||||
|
selectedStatus.value = null
|
||||||
|
selectedTags.value = []
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
@@ -208,7 +213,7 @@ function toggleTag(tag: string) {
|
|||||||
</p>
|
</p>
|
||||||
<UButton
|
<UButton
|
||||||
class="mt-4"
|
class="mt-4"
|
||||||
@click="selectedStatus = null; selectedTags = []"
|
@click="clearFilters"
|
||||||
>
|
>
|
||||||
Clear Filters
|
Clear Filters
|
||||||
</UButton>
|
</UButton>
|
||||||
|
|||||||
Reference in New Issue
Block a user