Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 4e10f34

Browse files
committed
fix: variable name
1 parent 9c2cf88 commit 4e10f34

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/style.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ export default class Style {
7777
// Find corresponding footer cell
7878
const footerCell = this.footer.querySelector(`.dt-cell[data-col-index="${colIndex}"]`);
7979

80-
if (~~(bodyCell.offsetLeft - scrollLeft) > colLeft) {
80+
if (bodyCell && ~~(bodyCell.offsetLeft - scrollLeft) > colLeft) {
8181
headerCell.style.transform = `translateX(${-scrollLeft - 1}px)`;
8282
if (footerCell) {
8383
footerCell.style.transform = `translateX(${scrollLeft ? -scrollLeft - 1 : 0}px)`;
@@ -91,7 +91,7 @@ export default class Style {
9191
this._settingHeaderPosition = false;
9292
if(this.instance.noData){
9393
$.style($(".no-data-message"),{
94-
left: `${this.instance.wrapper.clientWidth/2 -left}px`
94+
left: `${this.instance.wrapper.clientWidth/2 -(-scrollLeft)}px`
9595
})
9696
}
9797
this._settingHeaderPosition = false;

0 commit comments

Comments
 (0)