diff --git a/src/components/datatable/DataTable.vue b/src/components/datatable/DataTable.vue
index 7f5f49d06..35adad73e 100644
--- a/src/components/datatable/DataTable.vue
+++ b/src/components/datatable/DataTable.vue
@@ -61,7 +61,7 @@
@row-edit-init="onRowEditInit($event)" @row-edit-save="onRowEditSave($event)" @row-edit-cancel="onRowEditCancel($event)"/>
-
-
+
- {
+ this.$emit('virtual-scroll', {
+ first: (event.page - 1) * this.rows,
+ rows: this.rows * 2
+ });
+ }, this.virtualScrollDelay);
+ }
},
computed: {
containerClass() {
@@ -1498,7 +1524,8 @@ export default {
'p-datatable-auto-layout': this.autoLayout,
'p-datatable-resizable': this.resizableColumns,
'p-datatable-resizable-fit': this.resizableColumns && this.columnResizeMode === 'fit',
- 'p-datatable-scrollable': this.scrollable
+ 'p-datatable-scrollable': this.scrollable,
+ 'p-datatable-virtual-scrollable': this.virtualScroll
}
];
},
diff --git a/src/components/datatable/ScrollableView.vue b/src/components/datatable/ScrollableView.vue
index 1063b896f..828d48e92 100644
--- a/src/components/datatable/ScrollableView.vue
+++ b/src/components/datatable/ScrollableView.vue
@@ -12,12 +12,18 @@