Skip to content

fix: refresh functional icons after theme updates - #5238

Merged
fangsmile merged 1 commit into
VisActor:developfrom
biubiukam:fix/issue-4816-functional-icon-theme
Jul 27, 2026
Merged

fix: refresh functional icons after theme updates#5238
fangsmile merged 1 commit into
VisActor:developfrom
biubiukam:fix/issue-4816-functional-icon-theme

Conversation

@biubiukam

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 #4816

💡 Background and solution

Built-in functional icons are regenerated when the theme changes, but HeaderHelper, BodyHelper, and RowSeriesNumberHelper kept the icon objects cached during table initialization. As a result, rebuilding the scenegraph after updateOption(), updateTheme(), or assigning theme continued to use the previous icon colors.

This change adds an updateIcons() method to the three helpers and refreshes their cached icon definitions immediately after applying functional icon colors.

✅ Verification

  • npm test -- --runInBand __tests__/functional-icons-theme.test.ts __tests__/listTable.test.ts __tests__/options/listTable-icon.test.ts: 15 tests passed
  • npm run compile: passed
  • node common/scripts/install-run-rush.js build -t @visactor/vtable: completed successfully with existing build warnings
  • The repository-wide pre-push test was also attempted. It remains blocked by unrelated existing failures in vtable-sheet dependency/formula tests and the video-cell-first-frame.test.ts environment tests.

📝 Changelog

Language Changelog
🇺🇸 English Refresh built-in functional icon colors after table theme updates.
🇨🇳 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

@fangsmile
fangsmile merged commit 4e15ee6 into VisActor:develop Jul 27, 2026
2 checks passed
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] 修改主题中的functionalIconsStyle 配置后,updateOption后,图标的颜色没有生效

2 participants