From 306b38ef5d5a00ca654a4179ac390f95cf8116d7 Mon Sep 17 00:00:00 2001 From: mertsincan Date: Thu, 7 Oct 2021 09:26:26 +0300 Subject: [PATCH] Fixed #1646 - Kebab-case properties are not working on DataTable and TreeTable --- src/components/datatable/DataTable.vue | 2 +- src/components/datatable/TableBody.vue | 2 +- src/components/datatable/TableFooter.vue | 3 ++- src/components/datatable/TableHeader.vue | 3 ++- src/components/treetable/TreeTable.vue | 4 ++-- src/components/treetable/TreeTableRow.vue | 4 ++-- 6 files changed, 10 insertions(+), 8 deletions(-) diff --git a/src/components/datatable/DataTable.vue b/src/components/datatable/DataTable.vue index 44bf5927d..8414b3278 100755 --- a/src/components/datatable/DataTable.vue +++ b/src/components/datatable/DataTable.vue @@ -428,7 +428,7 @@ export default { }, methods: { columnProp(col, prop) { - return col.props ? ((col.type.props[prop].type === Boolean && col.props[prop] === '') ? true : col.props[prop]) : null; + return ObjectUtils.getVNodeProp(col, prop); }, onPage(event) { this.clearEditingMetaData(); diff --git a/src/components/datatable/TableBody.vue b/src/components/datatable/TableBody.vue index 18be716a2..3ac61d2c1 100755 --- a/src/components/datatable/TableBody.vue +++ b/src/components/datatable/TableBody.vue @@ -193,7 +193,7 @@ export default { }, methods: { columnProp(col, prop) { - return col.props ? ((col.type.props[prop].type === Boolean && col.props[prop] === '') ? true : col.props[prop]) : null; + return ObjectUtils.getVNodeProp(col, prop); }, shouldRenderRowGroupHeader(value, rowData, i) { let currentRowFieldData = ObjectUtils.resolveFieldData(rowData, this.groupRowsBy); diff --git a/src/components/datatable/TableFooter.vue b/src/components/datatable/TableFooter.vue index 0e993c4ce..d3f92ba6f 100755 --- a/src/components/datatable/TableFooter.vue +++ b/src/components/datatable/TableFooter.vue @@ -17,6 +17,7 @@