1👍
✅
Your updateOpeningTime function should be something like this:
updateOpeningTime(schedule) {
var instance = this;
this.api.put('/pubschedules/' + this.data.id, schedule).then(response => {
instance.data = response.data;
});
}
Otherwise inside the “then” of the API call the word this
is not referencing to the instance of your component.
Source:stackexchange.com