TypeError: Cannot read property '$emit' of undefined at vuejs-paginator.js:146
sebestenyb opened this issue · 0 comments
sebestenyb commented
Hi,
I get this error in version 2.0.1
fetchData: function fetchData(pageUrl) {
this.$emit("request_start");
pageUrl = pageUrl || this.resource_url;
var self = this;
this.$http.get(pageUrl, { headers: this.config.headers }).then(function (response) {
this.$emit("request_finish", response);
self.handleResponseData(response.data);
}).catch(function (response) {
this.$emit("request_error", response);
console.log('Fetching data failed.', response);
});
},
Shouldn't it be self.$emit("request_finish", response);
?