From 30e08a9dee14b8f0b833b95d398751ec27f6dc9e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tu=C4=9F=C3=A7e=20K=C3=BC=C3=A7=C3=BCko=C4=9Flu?= Date: Mon, 14 Mar 2022 15:01:01 +0300 Subject: [PATCH] Fixed #2310 - Colspan defect with hidden Columns --- src/components/datatable/TableBody.vue | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/components/datatable/TableBody.vue b/src/components/datatable/TableBody.vue index e389d5bdb..610b1bf24 100755 --- a/src/components/datatable/TableBody.vue +++ b/src/components/datatable/TableBody.vue @@ -505,7 +505,13 @@ export default { }, computed: { columnsLength() { - return this.columns ? this.columns.length : 0; + let hiddenColLength = 0; + + this.columns.forEach(column => { + if(this.columnProp(column, 'hidden')) hiddenColLength++; + }); + + return this.columns ? this.columns.length - hiddenColLength : 0; }, rowGroupHeaderStyle() { if (this.scrollable) {