Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/richdocuments.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJulius Härtl <jus@bitgrid.net>2019-09-10 17:45:33 +0300
committerGitHub <noreply@github.com>2019-09-10 17:45:33 +0300
commit16d22d94d8ef382a21546751d1f0385d8e68c018 (patch)
treea97bca6996158e12a148fb51fafa3c6321c3d12c /src
parent5fc4b6a10c5ad5f674ff2f8f2ec1af2d8f5095b8 (diff)
parent824027b3d9d77924af1f0fc5dc20756775a9caae (diff)
Merge pull request #612 from nextcloud/bugfix/noid/group-select
Properly set the groups fetched from the server
Diffstat (limited to 'src')
-rw-r--r--src/components/SettingsSelectGroup.vue12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/components/SettingsSelectGroup.vue b/src/components/SettingsSelectGroup.vue
index ccf945d6..e8bf6955 100644
--- a/src/components/SettingsSelectGroup.vue
+++ b/src/components/SettingsSelectGroup.vue
@@ -22,7 +22,7 @@
<template>
<multiselect v-model="inputValObjects"
- :options="Object.values(groups)" :options-limit="5"
+ :options="groupsArray" :options-limit="5"
:placeholder="label"
track-by="id"
label="displayname"
@@ -65,12 +65,15 @@ export default {
data() {
return {
inputValObjects: [],
- groups: []
+ groups: {}
}
},
computed: {
id() {
return 'settings-select-group-' + this.uuid
+ },
+ groupsArray() {
+ return Object.values(this.groups)
}
},
watch: {
@@ -104,15 +107,14 @@ export default {
},
asyncFindGroup(query) {
query = typeof query === 'string' ? encodeURI(query) : ''
- return axios.get(OC.linkToOCS(`cloud/groups/details?search=${query}&limit=1`, 2))
+ return axios.get(OC.linkToOCS(`cloud/groups/details?search=${query}&limit=10`, 2))
.then((response) => {
if (Object.keys(response.data.ocs.data.groups).length > 0) {
response.data.ocs.data.groups.forEach((element) => {
if (typeof this.groups[element.id] === 'undefined') {
- this.groups[element.id] = element
+ this.$set(this.groups, element.id, element)
}
})
-
return true
}
return false