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) {