diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/components/ContactDetails.vue | 5 | ||||
-rw-r--r-- | src/components/ContactDetails/ContactDetailsAddNewProp.vue | 6 | ||||
-rw-r--r-- | src/components/Properties/PropertyGroups.vue | 5 | ||||
-rw-r--r-- | src/views/Contacts.vue | 6 |
4 files changed, 20 insertions, 2 deletions
diff --git a/src/components/ContactDetails.vue b/src/components/ContactDetails.vue index c73c94f6..8767b444 100644 --- a/src/components/ContactDetails.vue +++ b/src/components/ContactDetails.vue @@ -768,6 +768,11 @@ export default { </script> <style lang="scss" scoped> +// Container height fix for dropdowns +.app-content-details { + min-height: calc(100vh - var(--header-height)); +} + // List of all properties section.contact-details { margin: 0 auto; diff --git a/src/components/ContactDetails/ContactDetailsAddNewProp.vue b/src/components/ContactDetails/ContactDetailsAddNewProp.vue index 7774b192..aafdfd7c 100644 --- a/src/components/ContactDetails/ContactDetailsAddNewProp.vue +++ b/src/components/ContactDetails/ContactDetailsAddNewProp.vue @@ -116,7 +116,11 @@ export default { this.contact.vCard.addProperty(property) } else { const defaultData = this.properties[id].defaultValue - const property = this.contact.vCard.addPropertyWithValue(id, defaultData ? defaultData.value : '') + let defaultValue = defaultData ? defaultData.value : '' + if (Array.isArray(defaultValue)) { + defaultValue = [...defaultValue] + } + const property = this.contact.vCard.addPropertyWithValue(id, defaultValue) if (defaultData && defaultData.type) { property.setParameter('type', defaultData.type) } diff --git a/src/components/Properties/PropertyGroups.vue b/src/components/Properties/PropertyGroups.vue index 340eb6a3..67e889b1 100644 --- a/src/components/Properties/PropertyGroups.vue +++ b/src/components/Properties/PropertyGroups.vue @@ -166,6 +166,11 @@ export default { contact: this.contact, groupName, }) + const group = this.$store.getters.getGroups.find(search => search.name === groupName) + if (group.contacts.length === 0) { + this.$emit('update:value', []) + } + }, /** diff --git a/src/views/Contacts.vue b/src/views/Contacts.vue index 78420b38..b323674c 100644 --- a/src/views/Contacts.vue +++ b/src/views/Contacts.vue @@ -275,8 +275,12 @@ export default { for (const name in properties) { if (properties[name].default) { const defaultData = properties[name].defaultValue + let defaultValue = defaultData.value + if (Array.isArray(defaultValue)) { + defaultValue = [...defaultValue] + } // add default field - const property = contact.vCard.addPropertyWithValue(name, defaultData.value) + const property = contact.vCard.addPropertyWithValue(name, defaultValue) // add default type if (defaultData.type) { property.setParameter('type', defaultData.type) |