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')"
|
||||||
|
|
|
@ -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,6 +12,7 @@
|
||||||
</NcTextField>
|
</NcTextField>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div v-if="detail">
|
||||||
<div class="photo" v-for="photo of detail" :key="photo.fileid">
|
<div class="photo" v-for="photo of detail" :key="photo.fileid">
|
||||||
<Tag :data="photo" :noNavigate="true" @open="clickFace" />
|
<Tag :data="photo" :noNavigate="true" @open="clickFace" />
|
||||||
</div>
|
</div>
|
||||||
|
@ -18,6 +20,7 @@
|
||||||
<div v-else>
|
<div v-else>
|
||||||
{{ t("memories", "Loading …") }}
|
{{ t("memories", "Loading …") }}
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
|
@ -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