Fix TagList when changing annotation, collapse tags on change.
authorAlexandre Segura <mex.zktk@gmail.com>
Wed, 22 Feb 2017 12:10:03 +0100
changeset 338 4aa67dd268ce
parent 337 db6c41f04e79
child 339 ba89f767b091
Fix TagList when changing annotation, collapse tags on change.
src_js/iconolab-bundle/src/components/tagform/ColorButtons.vue
src_js/iconolab-bundle/src/components/tagform/TagList.vue
--- a/src_js/iconolab-bundle/src/components/tagform/ColorButtons.vue	Wed Feb 22 12:02:29 2017 +0100
+++ b/src_js/iconolab-bundle/src/components/tagform/ColorButtons.vue	Wed Feb 22 12:10:03 2017 +0100
@@ -25,7 +25,13 @@
 
         data() {
             return {
-                value: null,
+                value: this.originalValue,
+            }
+        },
+
+        watch: {
+            originalValue: function(originalValue) {
+                this.value = originalValue;
             }
         },
 
--- a/src_js/iconolab-bundle/src/components/tagform/TagList.vue	Wed Feb 22 12:02:29 2017 +0100
+++ b/src_js/iconolab-bundle/src/components/tagform/TagList.vue	Wed Feb 22 12:10:03 2017 +0100
@@ -40,6 +40,7 @@
         watch: {
             originalTags: function(originalTags) {
                 this.tags = _.cloneDeep(this.originalTags);
+                this.hideAll();
             },
             tags: function(tags) {
                 this.$emit('change', { tags: tags });