Skip to content

Commit

Permalink
fix(VEditDialog): restored open/close/cancel events
Browse files Browse the repository at this point in the history
  • Loading branch information
jacekkarczmarczyk committed Jun 11, 2018
1 parent 3982b5e commit 073f412
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/components/VDataTable/VEditDialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,19 @@ export default {

watch: {
isActive (val) {
val && setTimeout(this.focus, 50) // Give DOM time to paint
if (val) {
this.$emit('open')
setTimeout(this.focus, 50) // Give DOM time to paint
} else {
this.$emit('close')
}
}
},

methods: {
cancel () {
this.isActive = false
this.$emit('cancel')
},
focus () {
const input = this.$refs.content.querySelector('input')
Expand Down

0 comments on commit 073f412

Please sign in to comment.