Refactored lazy loading demo

pull/41/head
cagataycivici 2019-07-10 13:49:15 +03:00
parent 8760c67f8b
commit bf87f5e533
1 changed files with 4 additions and 8 deletions

View File

@ -70,10 +70,8 @@ export default {
this.loading = true;
setTimeout(() => {
this.carService.getCarsLarge().then(data => {
this.cars = this.datasource.slice(event.first, event.first + event.rows);
this.loading = false;
});
this.cars = this.datasource.slice(event.first, event.first + event.rows);
this.loading = false;
}, 1000);
}
}
@ -119,10 +117,8 @@ export default {
this.loading = true;
setTimeout(() => {
this.carService.getCarsLarge().then(data => {
this.cars = this.datasource.slice(event.first, event.first + event.rows);
this.loading = false;
});
this.cars = this.datasource.slice(event.first, event.first + event.rows);
this.loading = false;
}, 1000);
}
},