Skip to content

Commit

Permalink
Fixed #6982 - DataTable: Frozen Columns, headers are overlapping wrongly
Browse files Browse the repository at this point in the history
  • Loading branch information
tugcekucukoglu committed Dec 20, 2024
1 parent e56b6cc commit e5af2d3
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 16 deletions.
4 changes: 2 additions & 2 deletions packages/primevue/src/datatable/BodyCell.vue
Original file line number Diff line number Diff line change
Expand Up @@ -496,7 +496,7 @@ export default {
let next = getNextElementSibling(this.$el, '[data-p-frozen-column="true"]');
if (next) {
pos = getOuterWidth(next) + parseFloat(next.style.right || 0);
pos = getOuterWidth(next) + parseFloat(next.style['inset-inline-end'] || 0);
}
this.styleObject.insetInlineEnd = pos + 'px';
Expand All @@ -505,7 +505,7 @@ export default {
let prev = getPreviousElementSibling(this.$el, '[data-p-frozen-column="true"]');
if (prev) {
pos = getOuterWidth(prev) + parseFloat(prev.style.left || 0);
pos = getOuterWidth(prev) + parseFloat(prev.style['inset-inline-start'] || 0);
}
this.styleObject.insetInlineStart = pos + 'px';
Expand Down
4 changes: 2 additions & 2 deletions packages/primevue/src/datatable/FooterCell.vue
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ export default {
let next = getNextElementSibling(this.$el, '[data-p-frozen-column="true"]');
if (next) {
pos = getOuterWidth(next) + parseFloat(next.style.right || 0);
pos = getOuterWidth(next) + parseFloat(next.style['inset-inline-end'] || 0);
}
this.styleObject.insetInlineEnd = pos + 'px';
Expand All @@ -82,7 +82,7 @@ export default {
let prev = getPreviousElementSibling(this.$el, '[data-p-frozen-column="true"]');
if (prev) {
pos = getOuterWidth(prev) + parseFloat(prev.style.left || 0);
pos = getOuterWidth(prev) + parseFloat(prev.style['inset-inline-start'] || 0);
}
this.styleObject.insetInlineStart = pos + 'px';
Expand Down
8 changes: 4 additions & 4 deletions packages/primevue/src/datatable/HeaderCell.vue
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ export default {
let next = getNextElementSibling(this.$el, '[data-p-frozen-column="true"]');
if (next) {
pos = getOuterWidth(next) + parseFloat(next.style.right || 0);
pos = getOuterWidth(next) + parseFloat(next.style['inset-inline-end'] || 0);
}
this.styleObject.insetInlineEnd = pos + 'px';
Expand All @@ -292,7 +292,7 @@ export default {
let prev = getPreviousElementSibling(this.$el, '[data-p-frozen-column="true"]');
if (prev) {
pos = getOuterWidth(prev) + parseFloat(prev.style.left || 0);
pos = getOuterWidth(prev) + parseFloat(prev.style['inset-inline-start'] || 0);
}
this.styleObject.insetInlineStart = pos + 'px';
Expand All @@ -304,8 +304,8 @@ export default {
let index = getIndex(this.$el);
if (filterRow.children[index]) {
filterRow.children[index].style.left = this.styleObject.left;
filterRow.children[index].style.right = this.styleObject.right;
filterRow.children[index].style['inset-inline-start'] = this.styleObject['inset-inline-start'];
filterRow.children[index].style['inset-inline-end'] = this.styleObject['inset-inline-end'];
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions packages/primevue/src/treetable/BodyCell.vue
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ export default {
let next = getNextElementSibling(this.$el, '[data-p-frozen-column="true"]');
if (next) {
pos = getOuterWidth(next) + parseFloat(next.style.right || 0);
pos = getOuterWidth(next) + parseFloat(next.style['inset-inline-end'] || 0);
}
this.styleObject.insetInlineEnd = pos + 'px';
Expand All @@ -188,7 +188,7 @@ export default {
let prev = getPreviousElementSibling(this.$el, '[data-p-frozen-column="true"]');
if (prev) {
pos = getOuterWidth(prev) + parseFloat(prev.style.left || 0);
pos = getOuterWidth(prev) + parseFloat(prev.style['inset-inline-start'] || 0);
}
this.styleObject.insetInlineStart = pos + 'px';
Expand Down
4 changes: 2 additions & 2 deletions packages/primevue/src/treetable/FooterCell.vue
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ export default {
let next = getNextElementSibling(this.$el, '[data-p-frozen-column="true"]');
if (next) {
pos = getOuterWidth(next) + parseFloat(next.style.right || 0);
pos = getOuterWidth(next) + parseFloat(next.style['inset-inline-end'] || 0);
}
this.styleObject.insetInlineEnd = pos + 'px';
Expand All @@ -82,7 +82,7 @@ export default {
let prev = getPreviousElementSibling(this.$el, '[data-p-frozen-column="true"]');
if (prev) {
pos = getOuterWidth(prev) + parseFloat(prev.style.left || 0);
pos = getOuterWidth(prev) + parseFloat(prev.style['inset-inline-start'] || 0);
}
this.styleObject.insetInlineStart = pos + 'px';
Expand Down
8 changes: 4 additions & 4 deletions packages/primevue/src/treetable/HeaderCell.vue
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ export default {
let next = getNextElementSibling(this.$el, '[data-p-frozen-column="true"]');
if (next) {
pos = getOuterWidth(next) + parseFloat(next.style.right || 0);
pos = getOuterWidth(next) + parseFloat(next.style['inset-inline-end'] || 0);
}
this.styleObject.insetInlineEnd = pos + 'px';
Expand All @@ -131,7 +131,7 @@ export default {
let prev = getPreviousElementSibling(this.$el, '[data-p-frozen-column="true"]');
if (prev) {
pos = getOuterWidth(prev) + parseFloat(prev.style.left || 0);
pos = getOuterWidth(prev) + parseFloat(prev.style['inset-inline-start'] || 0);
}
this.styleObject.insetInlineStart = pos + 'px';
Expand All @@ -142,8 +142,8 @@ export default {
if (filterRow) {
let index = getIndex(this.$el);
filterRow.children[index].style.left = this.styleObject.left;
filterRow.children[index].style.right = this.styleObject.right;
filterRow.children[index].style['inset-inline-start'] = this.styleObject['inset-inline-start'];
filterRow.children[index].style['inset-inline-end'] = this.styleObject['inset-inline-end'];
}
}
},
Expand Down

0 comments on commit e5af2d3

Please sign in to comment.