[Vuejs]-Vuetify datatable crud on click "new"

0👍

After hour trying.
Yes. Adding @click event on the button is right way.
After this just need manipulate with "current" row data.

methods: {
    ...
    newItem() {
        this.$store.dispatch('our-dispatch-method')
            .then(res => {
                res.id // For example we created element in our api and response is new ID.
                
                // Now push to the table item list editedItem and set the index
                this.PIATConsignments.push(this.editedItem)
                this.editedIndex = this.PIATConsignments.indexOf(this.editedItem)
                
                // Set your ID from api inside editedItem
                this.editedItem.id = res.id;
            })
    }
    ...
}

Leave a comment