[Bug] Duplicate frozen column elements in DOM and key collision warning when enableVirtualization={false}
Assessment
This issue has not been assessed yet.
Description
Describe the bug
When enableVirtualization is set to false, frozen/pinned columns are rendered twice in the DOM structure.
While the second set of frozen columns may not be visibly apparent on the screen in regular view, it causes duplicate key warnings (Warning: Encountered two children with the same key) in the console. Furthermore, when exporting the grid to PDF (where enableVirtualization={false} is typically used to render all items), these duplicated frozen columns appear twice side-by-side in the resulting PDF document.
To Reproduce
- Render a grid containing frozen/pinned columns.
- Set enableVirtualization={false} on the grid component.
- Open the browser DevTools and inspect the DOM structure for the grid header/row elements.
- Check the browser console for React key collision warnings.
- Export to PDF (or trigger print view) with enableVirtualization={false}.
Expected behavior
- Frozen columns should only be rendered once in the DOM.
- No React key duplicate warnings should occur in the console.
- Exported PDFs should only display frozen columns once.
Actual behavior
- Inspecting the DOM reveals that the frozen column elements are duplicated.
- Console logs a React warning about duplicate keys for the frozen column elements.
- Exported PDF output shows the frozen columns printed twice side-by-side.
Environment
- Library Version: 7.0.0-beta.61
- React Version: 19.2.0
- Browser/OS: Chrome / Windows 11
Additional Context
It appears that when virtualization is disabled (enableVirtualization={false}), the internal rendering logic duplicates the frozen column container/cells alongside the main column list, resulting in duplicate DOM nodes and key conflicts.
- Dominant language
- TypeScript
- Stars
- 7.7k
- Forks
- 2.2k
- Avg merge
- 1d 10h
- Merged PRs (30d)
- 30
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from Comcast/react-data-grid
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Comcast/react-data-grid#4045 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 68/100
Comcast/react-data-grid#4184 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 48/100
Comcast/react-data-grid#4004 · 4 comments ·
-
Pinned Rows API Open
Difficulty 5/5 Over a week Newbie friendliness 35/100
Comcast/react-data-grid#3940 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 55/100
Comcast/react-data-grid#3929 ·
All issues in Comcast/react-data-grid
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Eynzof/Hermes-CN-Desktop#610 ·
-
bug clawsweeper:linked-pr-open clawsweeper:needs-live-repro clawsweeper:no-new-fix-pr impact:message-loss issue-rating: 🐚 platinum hermit P2 regression
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
calcite-components needs triage refactor
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Esri/calcite-design-system#15203 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 78/100
fullcalendar/fullcalendar#8106 ·