diff options
author | Julius Härtl <jus@bitgrid.net> | 2019-09-10 17:45:33 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-09-10 17:45:33 +0300 |
commit | 16d22d94d8ef382a21546751d1f0385d8e68c018 (patch) | |
tree | a97bca6996158e12a148fb51fafa3c6321c3d12c | |
parent | 5fc4b6a10c5ad5f674ff2f8f2ec1af2d8f5095b8 (diff) | |
parent | 824027b3d9d77924af1f0fc5dc20756775a9caae (diff) |
Merge pull request #612 from nextcloud/bugfix/noid/group-select
Properly set the groups fetched from the server
-rw-r--r-- | src/components/SettingsSelectGroup.vue | 12 |
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 |