modal: auto focus face search (fix #484)
Signed-off-by: Varun Patil <varunpatil@ucla.edu>pull/488/head
parent
657909d76b
commit
c77f334182
|
@ -6,8 +6,9 @@
|
||||||
|
|
||||||
<div class="fields">
|
<div class="fields">
|
||||||
<NcTextField
|
<NcTextField
|
||||||
:value.sync="name"
|
|
||||||
class="field"
|
class="field"
|
||||||
|
:autofocus="true"
|
||||||
|
:value.sync="name"
|
||||||
:label="t('memories', 'Name')"
|
:label="t('memories', 'Name')"
|
||||||
:label-visible="false"
|
:label-visible="false"
|
||||||
:placeholder="t('memories', 'Name')"
|
:placeholder="t('memories', 'Name')"
|
||||||
|
@ -118,4 +119,4 @@ export default defineComponent({
|
||||||
.fields {
|
.fields {
|
||||||
margin-top: 8px;
|
margin-top: 8px;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="outer" v-if="detail">
|
<div class="outer">
|
||||||
<div class="search">
|
<div class="search">
|
||||||
<NcTextField
|
<NcTextField
|
||||||
|
:autofocus="true"
|
||||||
:value.sync="search"
|
:value.sync="search"
|
||||||
:label="t('memories', 'Search')"
|
:label="t('memories', 'Search')"
|
||||||
:placeholder="t('memories', 'Search')"
|
:placeholder="t('memories', 'Search')"
|
||||||
|
@ -11,12 +12,14 @@
|
||||||
</NcTextField>
|
</NcTextField>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="photo" v-for="photo of detail" :key="photo.fileid">
|
<div v-if="detail">
|
||||||
<Tag :data="photo" :noNavigate="true" @open="clickFace" />
|
<div class="photo" v-for="photo of detail" :key="photo.fileid">
|
||||||
|
<Tag :data="photo" :noNavigate="true" @open="clickFace" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div v-else>
|
||||||
|
{{ t("memories", "Loading …") }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
<div v-else>
|
|
||||||
{{ t("memories", "Loading …") }}
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -99,6 +102,7 @@ export default defineComponent({
|
||||||
},
|
},
|
||||||
|
|
||||||
searchChanged() {
|
searchChanged() {
|
||||||
|
if (!this.detail) return;
|
||||||
this.detail = this.search
|
this.detail = this.search
|
||||||
? this.fuse.search(this.search).map((r) => r.item)
|
? this.fuse.search(this.search).map((r) => r.item)
|
||||||
: this.fullDetail;
|
: this.fullDetail;
|
||||||
|
|
Loading…
Reference in New Issue