summaryrefslogtreecommitdiffstats
path: root/src/components/Properties
diff options
context:
space:
mode:
authorJohn Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>2018-11-18 17:49:27 +0100
committerJohn Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>2018-11-18 18:18:19 +0100
commitcaefe3ac654348185e72306da965b393cc5bcf59 (patch)
tree3748d2df005da48797a0fa706ee216be49caee07 /src/components/Properties
parent0547f92543eeecf8552ace982567708937bba3c6 (diff)
Always show groups
Fix #727 Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Diffstat (limited to 'src/components/Properties')
-rw-r--r--src/components/Properties/PropertyGroups.vue16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/components/Properties/PropertyGroups.vue b/src/components/Properties/PropertyGroups.vue
index 15677320..70407a00 100644
--- a/src/components/Properties/PropertyGroups.vue
+++ b/src/components/Properties/PropertyGroups.vue
@@ -28,10 +28,11 @@
<!-- multiselect taggable groups with a limit to 3 groups shown -->
<multiselect v-model="localValue" :options="groups" :placeholder="t('contacts', 'Add contact in group')"
- :limit="3" :multiple="true" :taggable="true"
- :close-on-select="false" :readonly="isReadOnly" tag-placeholder="create"
- class="property__value" @input="updateValue" @tag="validateGroup"
- @select="addContactToGroup" @remove="removeContactToGroup">
+ :multiple="true" :taggable="true" :close-on-select="false"
+ :readonly="isReadOnly" :tag-width="60"
+ tag-placeholder="create" class="property__value"
+ @input="updateValue" @tag="validateGroup" @select="addContactToGroup"
+ @remove="removeContactToGroup">
<!-- show how many groups are hidden and add tooltip -->
<span v-tooltip.auto="formatGroupsTitle" slot="limit" class="multiselect__limit">+{{ localValue.length - 3 }}</span>
@@ -98,7 +99,7 @@ export default {
/**
* Debounce and send update event to parent
*/
- updateValue: debounce(function(e) {
+ updateValue: debounce(function() {
// https://vuejs.org/v2/guide/components-custom-events.html#sync-Modifier
this.$emit('update:value', this.localValue)
}, 500),
@@ -108,11 +109,12 @@ export default {
*
* @param {String} groupName the group name
*/
- addContactToGroup(groupName) {
- this.$store.dispatch('addContactToGroup', {
+ async addContactToGroup(groupName) {
+ await this.$store.dispatch('addContactToGroup', {
contact: this.contact,
groupName
})
+ this.updateValue()
},
/**