Skip to content

Fix/5020 scroll to row dynamic row height#5052

Merged
fangsmile merged 2 commits intodevelopfrom
fix/5020-scrollToRow-dynamic-row-height
Mar 17, 2026
Merged

Fix/5020 scroll to row dynamic row height#5052
fangsmile merged 2 commits intodevelopfrom
fix/5020-scrollToRow-dynamic-row-height

Conversation

@fangsmile
Copy link
Contributor

run bugserver cases for #5051

[中文版模板 / Chinese template]

🤔 This is a ...

  • New feature
  • Bug fix
  • TypeScript definition update
  • Bundle size optimization
  • Performance optimization
  • Enhancement feature
  • Refactoring
  • Update dependency
  • Code style optimization
  • Test Case
  • Branch merge
  • Site / documentation update
  • Demo update
  • Workflow
  • Chore
  • Release
  • Other (about what?)

🔗 Related issue link

💡 Background and solution

📝 Changelog

Language Changelog
🇺🇸 English
🇨🇳 Chinese

☑️ Self-Check before Merge

⚠️ Please check all items below before requesting a reviewing. ⚠️

  • Doc is updated/provided or not needed
  • Demo is updated/provided or not needed
  • TypeScript definition is updated/provided or not needed
  • Changelog is provided or not needed

🚀 Summary

copilot:summary

🔍 Walkthrough

copilot:walkthrough

xueyuan and others added 2 commits March 16, 2026 16:06
…n with dynamic row heights

getRowsHeight() has a fast path that multiplies defaultRowHeight by the row count for
body rows when heightMode is 'standard', completely ignoring rowHeightsMap. This means
rows with computed heights (e.g. from autoWrapText) are not reflected in the scroll
position calculation, causing scrollToRow to land at the wrong position.

Fix: use rowHeightsMap.getSumInRange directly in scrollToCell so that actual
computed row heights are used for both the target position and the max-scroll cap.
For unrendered rows, getSumInRange already falls back to getRowHeight (defaultRowHeight),
so behavior is unchanged when no rows have been dynamically sized.

Closes #5020
…c-row-height

fix(table): use rowHeightsMap directly in scrollToCell to fix position with dynamic row heights
@fangsmile fangsmile merged commit c2217ba into develop Mar 17, 2026
6 of 8 checks passed
@fangsmile fangsmile deleted the fix/5020-scrollToRow-dynamic-row-height branch March 17, 2026 11:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant