From dbbf4ce38cd2f92d61a5e74d60ccb7996cccf55c Mon Sep 17 00:00:00 2001 From: Cagatay Civici Date: Wed, 20 Jan 2021 13:45:26 +0300 Subject: [PATCH] Remove timeout --- src/views/datatable/DataTableLazyDemo.vue | 24 ++++++++++------------- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/src/views/datatable/DataTableLazyDemo.vue b/src/views/datatable/DataTableLazyDemo.vue index 7d4cad19f..c19a83d57 100755 --- a/src/views/datatable/DataTableLazyDemo.vue +++ b/src/views/datatable/DataTableLazyDemo.vue @@ -116,13 +116,11 @@ export default { loadLazyData() { this.loading = true; - setTimeout(() => { - this.customerService.getCustomers({lazyEvent: JSON.stringify( this.lazyParams )}).then(data => { - this.customers = data.customers; - this.totalRecords = data.totalRecords; - this.loading = false; - }); - }, 1000); + this.customerService.getCustomers({lazyEvent: JSON.stringify( this.lazyParams )}).then(data => { + this.customers = data.customers; + this.totalRecords = data.totalRecords; + this.loading = false; + }); }, onPage(event) { this.lazyParams = event; @@ -194,13 +192,11 @@ export default { loadLazyData() { this.loading = true; - setTimeout(() => { - this.customerService.getCustomers({lazyEvent: JSON.stringify( this.lazyParams )}).then(data => { - this.customers = data.customers; - this.totalRecords = data.totalRecords; - this.loading = false; - }); - }, 1000); + this.customerService.getCustomers({lazyEvent: JSON.stringify( this.lazyParams )}).then(data => { + this.customers = data.customers; + this.totalRecords = data.totalRecords; + this.loading = false; + }); }, onPage(event) { this.lazyParams = event;