diff --git a/src/components/datatable/DataTable.d.ts b/src/components/datatable/DataTable.d.ts index 4bddc01a7..0dfa91764 100755 --- a/src/components/datatable/DataTable.d.ts +++ b/src/components/datatable/DataTable.d.ts @@ -56,6 +56,8 @@ interface DataTableProps { frozenValue?: any[]; responsiveLayout?: string; breakpoing?: string; + showGridlines?: boolean; + stripedRows?: boolean; } declare class DataTable { diff --git a/src/components/datatable/DataTable.vue b/src/components/datatable/DataTable.vue index 98e933460..7da9d8b50 100755 --- a/src/components/datatable/DataTable.vue +++ b/src/components/datatable/DataTable.vue @@ -301,6 +301,14 @@ export default { breakpoint: { type: String, default: '960px' + }, + showGridlines: { + type: Boolean, + default: false + }, + stripedRows: { + type: Boolean, + default: false } }, data() { @@ -1627,7 +1635,9 @@ export default { 'p-datatable-scrollable-both': this.scrollable && this.scrollDirection === 'both', 'p-datatable-flex-scrollable': (this.scrollable && this.scrollHeight === 'flex'), 'p-datatable-responsive-stack': this.responsiveLayout === 'stack', - 'p-datatable-responsive-scroll': this.responsiveLayout === 'scroll' + 'p-datatable-responsive-scroll': this.responsiveLayout === 'scroll', + 'p-datatable-striped': this.stripedRows, + 'p-datatable-gridlines': this.showGridlines } ]; }, diff --git a/src/components/treetable/TreeTable.d.ts b/src/components/treetable/TreeTable.d.ts index db3126b09..f7261a457 100755 --- a/src/components/treetable/TreeTable.d.ts +++ b/src/components/treetable/TreeTable.d.ts @@ -35,6 +35,7 @@ interface TreeTableProps { resizableColumns?: boolean; columnResizeMode?: string; indentation?: number; + showGridlines?: boolean; } declare class TreeTable { diff --git a/src/components/treetable/TreeTable.vue b/src/components/treetable/TreeTable.vue index 5d8e5caeb..708deb466 100755 --- a/src/components/treetable/TreeTable.vue +++ b/src/components/treetable/TreeTable.vue @@ -211,6 +211,10 @@ export default { indentation: { type: Number, default: 1 + }, + showGridlines: { + type: Boolean, + default: false } }, documentColumnResizeListener: null, @@ -794,6 +798,7 @@ export default { 'p-treetable-auto-layout': this.autoLayout, 'p-treetable-resizable': this.resizableColumns, 'p-treetable-resizable-fit': this.resizableColumns && this.columnResizeMode === 'fit', + 'p-treetable-gridlines': this.showGridlines }]; }, columns() { diff --git a/src/views/datatable/DataTableColResizeDemo.vue b/src/views/datatable/DataTableColResizeDemo.vue index 8224f4714..ff02bd5ea 100755 --- a/src/views/datatable/DataTableColResizeDemo.vue +++ b/src/views/datatable/DataTableColResizeDemo.vue @@ -11,7 +11,7 @@
Fit Mode
- + @@ -21,7 +21,7 @@
Expand Mode
- + @@ -38,7 +38,7 @@