diff --git a/docs/src/pages/components/Input.vue b/docs/src/pages/components/Input.vue index f9554c6..62f30da 100644 --- a/docs/src/pages/components/Input.vue +++ b/docs/src/pages/components/Input.vue @@ -114,6 +114,29 @@ + + + + + Name + Value + Description + + + + + + focus + Emits the Event object + Triggered when the user focuses the input + + + blur + Emits the Event object + Triggered when the user loses focus of the input + + + diff --git a/src/components/mdInputContainer/common.js b/src/components/mdInputContainer/common.js index 0b35fad..9877ca3 100644 --- a/src/components/mdInputContainer/common.js +++ b/src/components/mdInputContainer/common.js @@ -68,14 +68,18 @@ export default { this.parentContainer.inputLength = newValue ? newValue.length : 0; }); }, - onFocus() { + onFocus(event) { if (this.parentContainer) { this.parentContainer.isFocused = true; } + + this.$emit('focus', event); }, - onBlur() { + onBlur(event) { this.parentContainer.isFocused = false; this.setParentValue(); + + this.$emit('blur', event); }, onInput() { this.updateValues();