Virtual Scroll Misalignment with Variable Row Height in Ant Design Table
0 reputation · 25 Mar 2026, 23:18 UTC
Problem Context
The Ant Design v5 Table component supports virtual scrolling via scroll={{ y: 300 }}. The documentation explicitly states that a rowHeight must be provided for the virtual scroll algorithm to calculate offsets correctly. When omitted, the component defaults to 48 px, which can be significantly different from the actual height of rows that contain variable content such as multi‑line text or images.
Observed Behavior
With dynamic row heights, scrolling causes rows to overlap or leave blank gaps, breaking the visual continuity of the table. This misalignment is reported in community discussions but has not been formally addressed in the Ant Design issue tracker as of the latest v5.x releases.
Unresolved Questions
- What design strategies or API extensions can be used to support variable row heights while retaining virtual scrolling?
- Is there a recommended pattern for dynamically calculating
rowHeightat runtime to avoid rendering artifacts? - Does Ant Design plan to introduce a future feature that automatically detects and adapts to variable row heights in virtual scroll mode?