Fixed #841 - New Lazy DataTable Demo with Remote Source

pull/756/head
Tuğçe Küçükoğlu 2021-01-06 21:38:46 +03:00
parent 4bdebad445
commit 1d1c70827b
2 changed files with 13 additions and 9 deletions

View File

@ -17,4 +17,8 @@ export default class CustomerService {
getCustomersXLarge() {
return axios.get('demo/data/customers-xlarge.json').then(res => res.data.data);
}
getCustomers() {
return axios.get('https://www.primefaces.org/data/customers').then(res => res.data.customers)
}
}

View File

@ -58,7 +58,7 @@ export default {
this.loading = true;
setTimeout(() => {
this.customerService.getCustomersLarge().then(data => {
this.customerService.getCustomers().then(data => {
this.datasource = data;
this.totalRecords = data.length,
this.customers = this.datasource.slice(0, 10);
@ -105,7 +105,7 @@ export default {
this.loading = true;
setTimeout(() => {
this.customerService.getCustomersLarge().then(data => {
this.customerService.getCustomers().then(data => {
this.datasource = data;
this.totalRecords = data.length,
this.customers = this.datasource.slice(0, 10);