diff --git a/src/components/datatable/DataTable.vue b/src/components/datatable/DataTable.vue
index f83bc2910..9d606a605 100644
--- a/src/components/datatable/DataTable.vue
+++ b/src/components/datatable/DataTable.vue
@@ -19,7 +19,7 @@
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -62,7 +88,7 @@ import ObjectUtils from '../utils/ObjectUtils';
import FilterUtils from '../utils/FilterUtils';
import DomHandler from '../utils/DomHandler';
import Paginator from '../paginator/Paginator';
-//import ScrollableView from './ScrollableView.vue';
+import ScrollableView from './ScrollableView.vue';
import TableHeader from './TableHeader.vue';
import TableBody from './TableBody.vue';
import TableFooter from './TableFooter.vue';
@@ -244,6 +270,14 @@ export default {
rowClass: {
type: null,
default: null
+ },
+ scrollable: {
+ type: Boolean,
+ default: false
+ },
+ scrollHeight: {
+ type: String,
+ default: null
}
},
data() {
@@ -1409,7 +1443,8 @@ export default {
'p-datatable-hoverable-rows': (this.rowHover || this.selectionMode),
'p-datatable-auto-layout': this.autoLayout,
'p-datatable-resizable': this.resizableColumns,
- 'p-datatable-resizable-fit': this.resizableColumns && this.columnResizeMode === 'fit'
+ 'p-datatable-resizable-fit': this.resizableColumns && this.columnResizeMode === 'fit',
+ 'p-datatable-scrollable': this.scrollable
}
];
},
@@ -1532,7 +1567,7 @@ export default {
},
components: {
'DTPaginator': Paginator,
- //'DTScrollableView': ScrollableView,
+ 'DTScrollableView': ScrollableView,
'DTTableHeader': TableHeader,
'DTTableBody': TableBody,
'DTTableFooter': TableFooter,
diff --git a/src/components/datatable/ScrollableView.vue b/src/components/datatable/ScrollableView.vue
index 10b7fa2cb..73b49f312 100644
--- a/src/components/datatable/ScrollableView.vue
+++ b/src/components/datatable/ScrollableView.vue
@@ -1,14 +1,127 @@
-
+
\ No newline at end of file
diff --git a/src/views/datatable/DataTableScrollDemo.vue b/src/views/datatable/DataTableScrollDemo.vue
index d01e3716d..7dba09916 100644
--- a/src/views/datatable/DataTableScrollDemo.vue
+++ b/src/views/datatable/DataTableScrollDemo.vue
@@ -11,7 +11,7 @@
Vertical
-
+