Skip to content

fix: preserve pivot column widths after updateOption - #5299

Open
biubiukam wants to merge 6 commits into
VisActor:developfrom
biubiukam:fix/issue-5298-clear-col-width-cache
Open

fix: preserve pivot column widths after updateOption#5299
biubiukam wants to merge 6 commits into
VisActor:developfrom
biubiukam:fix/issue-5298-clear-col-width-cache

Conversation

@biubiukam

@biubiukam biubiukam commented Aug 29, 2026

Copy link
Copy Markdown
Contributor

🤔 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

Fixes #5298

💡 Background and solution

After updating a pivot table option, the first-screen scenegraph can recompute column widths only when no column has been manually resized. When manual widths are present, newly affected columns keep stale widths because the width calculation is skipped entirely.

The fix checks whether the columns in the calculation range still include any non-manually-resized column. If so, it reruns the width calculation for that range; the existing resized-column map continues to preserve manual widths. A regression test covers the mixed manual and automatic width case.

📝 Changelog

Language Changelog
🇺🇸 English Preserve manually resized pivot table column widths while recalculating other columns after updateOption.
🇨🇳 Chinese updateOption 后重新计算其他列宽时保留透视表中手动调整的列宽。

☑️ Self-Check before Merge

  • 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

Fix pivot table column-width recalculation after updateOption when only some columns have manual widths.

🔍 Walkthrough

  1. Detect unresized columns in the first-screen calculation range.
  2. Recalculate that range while preserving entries recorded in _widthResizedColMap.
  3. Add regression coverage and a patch changelog entry.

@biubiukam
biubiukam marked this pull request as ready for review August 29, 2026 01:04
fangsmile and others added 4 commits August 31, 2026 10:13
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Keep row-height recomputation from touching manually resized rows and avoid using a manual row as the representative height for fixed body rows.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] 使用updateOption时,row列宽度被重置为默认80

2 participants