-
Notifications
You must be signed in to change notification settings - Fork 431
Open
Labels
Description
Describe the bug
Hi @ghiscoding ,
Hope you're doing well.
Wondering if you have a moment to take a quick look at a bug / suggested fix?
Problem:
I recently encountered a CSS rendering issue at large counts:
See correct styles here for comparison:
Solution:
I found that it relates to this line of code in appendRowHTML for slick.grid.ts:
const frozenRowOffset = this.getFrozenRowOffset(row);
const rowDiv = Utils.createDomElement('div', { className: `ui-widget-content ${rowCss}`, role: 'row', style: { top: `${this.getRowTop(row) - frozenRowOffset}px` } });
let rowDivR: HTMLElement | undefined;
divArrayL.push(rowDiv);
if (this.hasFrozenColumns()) {
// it has to be a deep copy otherwise we will have issues with pass by reference in js since
// attempting to add the same element to 2 different arrays will just move 1 item to the other array
rowDivR = rowDiv.cloneNode(true) as HTMLElement;
divArrayR.push(rowDivR);
}
The following fix resolves the issue, and the repo tests still seem ok:
const frozenRowOffset = this.getFrozenRowOffset(row);
const topValue = this.getRowTop(row) - frozenRowOffset; // Calculated top value
const rowDiv = Utils.createDomElement('div', {
className: `ui-widget-content ${rowCss}`,
role: 'row',
style: { transform: `translateY(${topValue}px)` } // Using transform instead of top
});
If this all looks ok to you, wondering if a special access is required to push a branch with the fix ? As I tried to but it said access denied.
Thanks,
Pete
Reproduction
Grid with approx 10m rows with grid line styles . - > close to 10m it will encounter rendering issues.
Which Framework are you using?
React
Environment Info
System:
OS: Linux 6.8 Ubuntu 24.04 LTS 24.04 LTS (Noble Numbat)
CPU: (24) x64 12th Gen Intel(R) Core(TM) i9-12900KF
Memory: 51.57 GB / 62.58 GB
Container: Yes
Shell: 5.9 - /usr/bin/zsh
Binaries:
Node: 20.15.1 - ~/.nvm/versions/node/v20.15.1/bin/node
Yarn: 1.22.22 - ~/.nvm/versions/node/v20.15.1/bin/yarn
npm: 10.8.2 - ~/.nvm/versions/node/v20.15.1/bin/npm
Browsers:
Chrome: 126.0.6478.182Validations
- Follow our Code of Conduct
- Read the Wikis.
- Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- Check that this is a concrete bug. For Q&A open a GitHub Discussion.
- The provided reproduction is a minimal reproducible example of the bug.


