Fixed #1461 - pFrozenColumn is moving when position set to left

pull/1478/head
Yiğit FINDIKLI 2021-08-20 15:58:48 +03:00
parent 63b1d95667
commit 32d23d01e9
1 changed files with 9 additions and 2 deletions

View File

@ -1071,7 +1071,7 @@ export default {
else if (this.columnResizeMode === 'expand') { else if (this.columnResizeMode === 'expand') {
this.$refs.table.style.width = this.$refs.table.offsetWidth + delta + 'px'; this.$refs.table.style.width = this.$refs.table.offsetWidth + delta + 'px';
if (!this.scrollable) if (!this.scrollable)
this.resizeColumnElement.style.width = newColumnWidth + 'px'; this.resizeColumnElement.style.width = newColumnWidth + 'px';
else else
this.resizeTableCells(newColumnWidth); this.resizeTableCells(newColumnWidth);
@ -1618,7 +1618,14 @@ export default {
this.d_columnOrder = columnOrder; this.d_columnOrder = columnOrder;
}, },
updateScrollWidth() { updateScrollWidth() {
this.$refs.table.style.width = DomHandler.width(this.$refs.table.parentElement) - DomHandler.calculateScrollbarWidth() + 'px'; let parentElementHeight = DomHandler.width(this.$refs.table.parentElement);
if (this.$refs.table.scrollWidth > parentElementHeight) {
this.$refs.table.style.width = this.$refs.table.scrollWidth + 'px';
}
else {
this.$refs.table.style.width = parentElementHeight - DomHandler.calculateScrollbarWidth() + 'px';
}
}, },
createResponsiveStyle() { createResponsiveStyle() {
if (!this.styleElement) { if (!this.styleElement) {