Fix tag filter submitting as a form and sanitize input
This commit is contained in:
parent
a511cf398f
commit
3a5182142e
@ -25,7 +25,7 @@ export default {
|
||||
methods: {
|
||||
filterSearches(toFilter: string) {
|
||||
const categories = this.$refs.categoryItem
|
||||
const wantedTags: string[] = toFilter.split(',').filter((v) => v.toLowerCase())
|
||||
const wantedTags: string[] = toFilter.toLowerCase().split(',').filter((v) => v.toLowerCase())
|
||||
|
||||
for (let category of categories as any) {
|
||||
let tagElements = category.getElementsByTagName('span')
|
||||
@ -125,7 +125,7 @@ export default {
|
||||
|
||||
<div class="pt-5 inline-flex text-white">
|
||||
<p class="mr-2 font-bold text-white">{{ $t('home.tagDescription') }}</p>
|
||||
<form class="relative">
|
||||
<div class="relative">
|
||||
<label for="searchBar" class="hidden">{{ $t('main.search') }}</label>
|
||||
<v-icon name="io-search-outline" class="absolute my-auto inset-y-0 left-2"></v-icon>
|
||||
<input
|
||||
@ -137,7 +137,7 @@ export default {
|
||||
@keyup="filterSearches(filterTags)"
|
||||
class="rounded-md p-1 pl-8 text-black bg-neutral-500 placeholder:text-white"
|
||||
/>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user