Skip to content

Instantly share code, notes, and snippets.

@emtudo
Last active April 27, 2017 16:35
Show Gist options
  • Save emtudo/85be273427fec31002be449f3181c9ea to your computer and use it in GitHub Desktop.
Save emtudo/85be273427fec31002be449f3181c9ea to your computer and use it in GitHub Desktop.
doOnSaved (entity) {
entity = prepareEntity(entity)
const entities = this.entities.data
const current = entities.find(row => row.id === entity.id)
if (current === undefined) {
entities.push(entity)
}
else {
entities[entities.indexOf(current)] = entity
}
this.entities.data = [ ...entities ]
this.visibleModalForm = false
setTimeout(() => {
this.showModalForm = false
}, 100)
},
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment