From 5abf1cdb78fe3a8d658ccdf9513da57de3c9fea1 Mon Sep 17 00:00:00 2001 From: cagataycivici Date: Fri, 7 Feb 2020 10:26:53 +0300 Subject: [PATCH] Doc update --- src/views/datatable/DataTableDoc.vue | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/views/datatable/DataTableDoc.vue b/src/views/datatable/DataTableDoc.vue index e0e8cd66d..6e69aa9f2 100644 --- a/src/views/datatable/DataTableDoc.vue +++ b/src/views/datatable/DataTableDoc.vue @@ -708,13 +708,13 @@ export default {

Lazy Loading

-

Lazy mode is handy to deal with large datasets, instead of loading the entire data, small chunks of data is loaded by invoking corresponding callbacks everytime paging, sorting and filtering happens. Sample belows imitates lazy paging by using an in memory list. +

Lazy mode is handy to deal with large datasets, instead of loading the entire data, small chunks of data is loaded by invoking corresponding callbacks such as paging and sorting. Sample belows imitates lazy paging by using an in memory list. It is also important to assign the logical number of rows to totalRecords by doing a projection query for paginator configuration so that paginator displays the UI assuming there are actually records of totalRecords size although in reality they aren't as in lazy mode, only the records that are displayed on the current page exist.

Lazy loading is implemented by handling pagination and sorting using page and sort events by making a remote query using the information - passed to the events such as first offset, number of rows and sort field for ordering. Filtering is handled differently as filter elements are defined using templates, use - the event you prefer on your form elements such as input, change, blur to make a remote call by passing the filters property to update the displayed data. Note that, + passed to the events such as first offset, number of rows and sort field for ordering. Filtering is handled differently as filter elements are defined using templates. filter event is not triggered in + lazy mode instead use the event you prefer on your form elements such as input, change, blur to make a remote call by passing the filters property to update the displayed data. Note that, in lazy filtering, totalRecords should also be updated to align the data with the paginator.

Here is a sample paging implementation with in memory data, a more enhanced example with a backend is being worked on and will be available at a github repository.