diff --git a/src/components/dataview/DataView.vue b/src/components/dataview/DataView.vue index fa530029d..d4af3f329 100644 --- a/src/components/dataview/DataView.vue +++ b/src/components/dataview/DataView.vue @@ -196,10 +196,14 @@ data = this.sort(); } - if (this.paginator) - return data.slice(this.d_first, this.d_first + this.d_rows); - else + if (this.paginator) { + const first = this.lazy ? 0 : this.d_first; + return data.slice(first, first + this.d_rows); + } + else { return data; + } + } else { return null; diff --git a/src/views/dataview/DataViewDemo.vue b/src/views/dataview/DataViewDemo.vue index 81f0c6c2d..c6b65d469 100644 --- a/src/views/dataview/DataViewDemo.vue +++ b/src/views/dataview/DataViewDemo.vue @@ -9,7 +9,7 @@
Lazy loading is useful to deal with huge datasets, in order to implement lazy loading use the pagination and utilize the page callback to load your data from the backend. + Pagination in this case needs to display the logical number of records bound to the totalRecords property so that paginator can display itself according to the total records although you'd only + need to load the data of the current page.
+