diff --git a/src/components/datatable/DataTable.vue b/src/components/datatable/DataTable.vue index 43163da22..a819aba61 100644 --- a/src/components/datatable/DataTable.vue +++ b/src/components/datatable/DataTable.vue @@ -1031,7 +1031,7 @@ export default { this.resizeColumnElement.style.width = newColumnWidth + 'px'; if(nextColumn) { nextColumn.style.width = nextColumnWidth + 'px'; - } + } } } } @@ -1069,7 +1069,7 @@ export default { let col = colGroup.children[resizeColumnIndex]; let nextCol = col.nextElementSibling; col.style.width = newColumnWidth + 'px'; - + if (nextCol && nextColumnWidth) { nextCol.style.width = nextColumnWidth + 'px'; } @@ -1246,7 +1246,7 @@ export default { const scrollableBodyTableWidth = column ? scrollableBodyTable.offsetWidth + delta : newColumnWidth; const scrollableHeaderTableWidth = column ? scrollableHeaderTable.offsetWidth + delta : newColumnWidth; const isContainerInViewport = this.$el.offsetWidth >= parseFloat(scrollableBodyTableWidth); - + let setWidth = (container, table, width, isContainerInViewport) => { if (container && table) { container.style.width = isContainerInViewport ? width + DomHandler.calculateScrollbarWidth(scrollableBody) + 'px' : 'auto' @@ -1257,7 +1257,7 @@ export default { setWidth(scrollableBody, scrollableBodyTable, scrollableBodyTableWidth, isContainerInViewport); setWidth(scrollableHeader, scrollableHeaderTable, scrollableHeaderTableWidth, isContainerInViewport); setWidth(scrollableFooter, scrollableFooterTable, scrollableHeaderTableWidth, isContainerInViewport); - + if (column) { let resizeColumnIndex = DomHandler.index(column); @@ -1535,7 +1535,7 @@ export default { this.$el.style.width = this.tableWidthState; } } - + if (this.scrollable) { let headerCols = DomHandler.find(this.$el, '.p-datatable-scrollable-header-table > colgroup > col'); let bodyCols = DomHandler.find(this.$el, '.p-datatable-scrollable-body-table > colgroup > col'); @@ -1548,7 +1548,7 @@ export default { headers.forEach((header, index) => header.style.width = widths[index] + 'px'); } - + } }, onCellEditInit(event) { diff --git a/src/views/datatable/DataTableDoc.vue b/src/views/datatable/DataTableDoc.vue index 9bf055c1b..819a9be53 100644 --- a/src/views/datatable/DataTableDoc.vue +++ b/src/views/datatable/DataTableDoc.vue @@ -645,8 +645,8 @@ data() {
When using frozen columns with column grouping, use frozenheadergroup and frozenfootergroup types to define grouping for the frozen section.
-Virtual scrolling is enabled using virtualScroll and onVirtualScroll properties combined with lazy loading so that data is loaded on the fly during scrolling. - For smooth scrolling twice the amount of rows property is loaded on a lazy load event. In addition, to avoid performance problems row height is not calculated automatically and +
Virtual scrolling is enabled using virtualScroll and onVirtualScroll properties combined with lazy loading so that data is loaded on the fly during scrolling.
+ For smooth scrolling twice the amount of rows property is loaded on a lazy load event. In addition, to avoid performance problems row height is not calculated automatically and
should be provided using virtualRowHeight property which defaults to 28px. View the