Using keydown instead of search event in filters for browser compatability, added search button.

This commit is contained in:
DebaucheryLibrarian 2024-04-02 03:13:15 +02:00
parent 815cc7694a
commit 17c10df1e8
3 changed files with 40 additions and 4 deletions

View File

@ -1,14 +1,21 @@
<template> <template>
<div class="page"> <div class="page">
<Filters :results="total"> <Filters :results="total">
<div class="filter"> <div class="filter search-container">
<!-- onsearch not compatible with FF and Safari -->
<input <input
v-model="q" v-model="q"
type="search" type="search"
placeholder="Search actors" placeholder="Search actors"
class="input search" class="input search"
@search="search" @keydown.enter="search"
> >
<Icon
icon="search"
class="search-button"
@click="search"
/>
</div> </div>
<GenderFilter <GenderFilter

View File

@ -85,6 +85,28 @@ function toggleFilters(state) {
} }
} }
.filter.search-container {
display: flex;
align-items: stretch;
.input {
flex-grow: 1;
}
.icon {
height: auto;
display: flex;
align-items: center;
padding-left: .5rem;
fill: var(--shadow);
&:hover {
cursor: pointer;
fill: var(--primary);
}
}
}
.filter-mode { .filter-mode {
width: 100%; width: 100%;
color: var(--shadow); color: var(--shadow);

View File

@ -7,14 +7,21 @@
v-if="showFilters" v-if="showFilters"
:loading="loading" :loading="loading"
> >
<div class="filter"> <div class="filter search-container">
<!-- onsearch not compatible with FF and Safari -->
<input <input
v-model="filters.search" v-model="filters.search"
type="search" type="search"
placeholder="Search scenes" placeholder="Search scenes"
class="search input" class="search input"
@search="search" @keydown.enter="search"
> >
<Icon
icon="search"
class="search-button"
@click="search"
/>
</div> </div>
<TagsFilter <TagsFilter