summaryrefslogtreecommitdiffstats
path: root/src/views
diff options
context:
space:
mode:
Diffstat (limited to 'src/views')
-rw-r--r--src/views/Contacts.vue21
1 files changed, 19 insertions, 2 deletions
diff --git a/src/views/Contacts.vue b/src/views/Contacts.vue
index fe947279..8e4c638a 100644
--- a/src/views/Contacts.vue
+++ b/src/views/Contacts.vue
@@ -36,7 +36,8 @@
<import-screen v-if="importState.stage !== 'default'" />
<template v-else>
<!-- contacts list -->
- <content-list :list="contactsList" :contacts="contacts" :loading="loading" />
+ <content-list :list="contactsList" :contacts="contacts" :loading="loading"
+ :search-query="searchQuery" />
<!-- main contacts details -->
<contact-details :loading="loading" :uid="selectedContact" />
</template>
@@ -83,7 +84,8 @@ export default {
data() {
return {
- loading: true
+ loading: true,
+ searchQuery: ''
}
},
@@ -200,6 +202,13 @@ export default {
}
},
+ mounted() {
+ /**
+ * Register search
+ */
+ this.userSearch = new OCA.Search(this.search, this.resetSearch)
+ },
+
beforeMount() {
// get addressbooks then get contacts
client.connect({ enableCardDAV: true }).then(() => {
@@ -302,6 +311,14 @@ export default {
})
}
}
+ },
+
+ /* SEARCH */
+ search(query) {
+ this.searchQuery = query
+ },
+ resetSearch() {
+ this.search('')
}
}
}