Skip to content

Commit

Permalink
fix (v-edit-dialog): restores **save** event
Browse files Browse the repository at this point in the history
fixes #3197
  • Loading branch information
jacekkarczmarczyk committed Feb 8, 2018
1 parent 0b1078c commit 059d64d
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions src/components/VDataTable/VEditDialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ export default {

data () {
return {
isActive: false,
isSaving: false
isActive: false
}
},

Expand Down Expand Up @@ -60,7 +59,10 @@ export default {
'class': 'small-dialog__actions'
}, [
this.genButton(this.cancel, this.cancelText),
this.genButton(() => this.save(this.returnValue), this.saveText)
this.genButton(() => {
this.save(this.returnValue)
this.$emit('save')
}, this.saveText)
])
},
genContent () {
Expand All @@ -69,7 +71,10 @@ export default {
keydown: e => {
const input = this.$refs.content.querySelector('input')
e.keyCode === 27 && this.cancel()
e.keyCode === 13 && input && this.save(input.value)
if (e.keyCode === 13 && input) {
this.save(input.value)
this.$emit('save')
}
}
},
ref: 'content'
Expand Down

0 comments on commit 059d64d

Please sign in to comment.