From c9168ee98460f365e085e145c28c67abb2c113c2 Mon Sep 17 00:00:00 2001 From: Marcos Moura Date: Tue, 27 Dec 2016 17:11:31 -0200 Subject: [PATCH] create chip documentation --- docs/src/pages/components/Chips.vue | 62 +++++++++++++++++++++++++++++ src/components/mdChips/mdChips.vue | 3 ++ 2 files changed, 65 insertions(+) diff --git a/docs/src/pages/components/Chips.vue b/docs/src/pages/components/Chips.vue index 8a9c651..92960d0 100644 --- a/docs/src/pages/components/Chips.vue +++ b/docs/src/pages/components/Chips.vue @@ -6,6 +6,50 @@
+ + + + + Name + Type + Description + + + + + + disabled + Boolean + Disable the chip and prevent his actions. Default: false + + + + md-deletable + Boolean + Enable delete button. Default: false + + + + + + + + Name + Value + Description + + + + + + delete + None + Triggered when delete button is clicked. + + + + + @@ -66,6 +110,24 @@ + + + + + Name + Value + Description + + + + + + change + The selcted chips Array + Triggered when the chips is created or deleted. + + +
diff --git a/src/components/mdChips/mdChips.vue b/src/components/mdChips/mdChips.vue index 31bf468..9175dae 100644 --- a/src/components/mdChips/mdChips.vue +++ b/src/components/mdChips/mdChips.vue @@ -85,6 +85,7 @@ this.selectedChips.push(value); this.currentChip = null; this.$emit('input', this.selectedChips); + this.$emit('change', this.selectedChips); this.applyInputFocus(); } } @@ -96,11 +97,13 @@ this.selectedChips.splice(index, 1); } + this.$emit('change', this.selectedChips); this.applyInputFocus(); }, deleteLastChip() { if (!this.currentChip) { this.selectedChips.pop(); + this.$emit('change', this.selectedChips); this.applyInputFocus(); } }