summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Steinmetz <richard@steinmetz.cloud>2022-09-29 20:57:49 +0200
committerGitHub <noreply@github.com>2022-09-29 20:57:49 +0200
commitcf516677800006ffe062bdcf32c8d36eb7dad40b (patch)
tree17b8230dc1ad3346c23ebb9bbae670b5a8475f1c
parent2ac086820104f82740eece60a0e1fea834b94c04 (diff)
parent01bdae6f3496fcc0e38a5f676f7e40be1b245aa5 (diff)
Merge pull request #2998 from nextcloud/backport/2997/stable5.0
[stable5.0] Fix address book picker
-rw-r--r--src/components/ContactDetails.vue6
-rw-r--r--src/components/Properties/PropertySelect.vue2
2 files changed, 6 insertions, 2 deletions
diff --git a/src/components/ContactDetails.vue b/src/components/ContactDetails.vue
index 97021d70..089571fb 100644
--- a/src/components/ContactDetails.vue
+++ b/src/components/ContactDetails.vue
@@ -442,7 +442,10 @@ export default {
return this.contact.addressbook.id
},
set(addressbookId) {
- this.moveContactToAddressbook(addressbookId)
+ // Only move when the address book actually changed to prevent a conflict.
+ if (this.contact.addressbook.id !== addressbookId) {
+ this.moveContactToAddressbook(addressbookId)
+ }
},
},
@@ -479,6 +482,7 @@ export default {
* This is the list of addressbooks that are available to write
*
* @return {Array}
+ * @return {{id: string, name: string}[]}
*/
addressbooksOptions() {
return this.addressbooks
diff --git a/src/components/Properties/PropertySelect.vue b/src/components/Properties/PropertySelect.vue
index eaca3116..8efe6c82 100644
--- a/src/components/Properties/PropertySelect.vue
+++ b/src/components/Properties/PropertySelect.vue
@@ -39,7 +39,7 @@
</div>
<Multiselect v-model="matchedOptions"
- :options="options || propModel.options"
+ :options="propModel.options || options"
:placeholder="t('contacts', 'Select option')"
:disabled="isSingleOption || isReadOnly"
class="property__value"