Skip to content

Commit

Permalink
delete item after extended details destroy
Browse files Browse the repository at this point in the history
  • Loading branch information
szczepanmasny committed Sep 24, 2019
1 parent 8075ac7 commit eae86bf
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
6 changes: 5 additions & 1 deletion src/utils/crud/components/ItemDetailsContainer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,8 @@ export default {
'setIdColumn',
'setChildItemsMapping',
'moveItem',
'setNextItem'
'setNextItem',
'itemDetails'
]),
escapeHandler (event) {
if (event.which === 27) {
Expand All @@ -114,6 +115,9 @@ export default {
next () {
this.moveItem(['next', true])
}
},
destroyed() {
this.itemDetails({})
}
}
Expand Down
8 changes: 4 additions & 4 deletions src/utils/crud/components/ItemDetailsExtended.vue
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,6 @@ export default {
item: {
handler (val) {
this.setFields()
this.reload = true
setTimeout(() => {
this.reload = false
}, 100)
},
deep: true
}
Expand Down Expand Up @@ -93,6 +89,10 @@ export default {
return rField
})
this.$set(this, 'fields', result)
this.reload = true
setTimeout(() => {
this.reload = false
}, 100)
},
update (field) {
const obj = {}
Expand Down

0 comments on commit eae86bf

Please sign in to comment.