From bf87f5e53368888d11424222af439cf21a1d583b Mon Sep 17 00:00:00 2001 From: cagataycivici Date: Wed, 10 Jul 2019 13:49:15 +0300 Subject: [PATCH] Refactored lazy loading demo --- src/views/datatable/DataTableLazyDemo.vue | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/src/views/datatable/DataTableLazyDemo.vue b/src/views/datatable/DataTableLazyDemo.vue index 3033e6b60..df338283a 100644 --- a/src/views/datatable/DataTableLazyDemo.vue +++ b/src/views/datatable/DataTableLazyDemo.vue @@ -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); } },