I want to create a new item. After created successfully I need to update the item list. When I set the item list from server it fails to update in view.
<v-btn @click="create(item)" >
</v-btn>
data: () => ({
items: [],
})
methods: {
create (item) {
createItem(item).then(response => {
this.scene = this.scenes.list
this.item = null
var options = {
page: 0,
itemsPerPage: 10,
}
getItems(options).then(function (response) {
this.items= response.content
}.bind(this))
})
},
}
When I debug, 'this.items= response.content' is successfuly set. But in view the data is not updated. How to fix this?