Skip to content

fix(menu): Render the correct theme when using 'getPopupContainer'#41465

Merged
afc163 merged 1 commit intoant-design:masterfrom
Yuiai01:menu-style
Mar 27, 2023
Merged

fix(menu): Render the correct theme when using 'getPopupContainer'#41465
afc163 merged 1 commit intoant-design:masterfrom
Yuiai01:menu-style

Conversation

@Yuiai01
Copy link
Copy Markdown
Contributor

@Yuiai01 Yuiai01 commented Mar 27, 2023

[中文版模板 / Chinese template]

🤔 This is a ...

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

🔗 Related issue link

ref #41423 (comment)

💡 Background and solution

当前如果在 Menu 组件中使用 getPopupContainer 选中主菜单(getPopupContainer={(node) => node.parentNode} )时子菜单如果设置了 theme ,那么该 theme 将被主菜单 theme 覆盖,修改前后可见下图:
修改前,主菜单 theme 为dark,子菜单 theme 为 light:
image

修改后
1、主菜单 theme 为 dark,子菜单 theme 为 light:
image

2、主菜单 theme 为 light,子菜单 theme 为 dark:
image

📝 Changelog

Language Changelog
🇺🇸 English Fixed submenu themes being overwritten when using getPopupContainer to select the main menu
🇨🇳 Chinese 修复使用 getPopupContainer 选择主菜单时子菜单主题被覆盖

☑️ 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

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Mar 27, 2023

@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 27, 2023

Codecov Report

Patch and project coverage have no change.

Comparison is base (c18a0ff) 100.00% compared to head (63891a7) 100.00%.

Additional details and impacted files
@@            Coverage Diff            @@
##            master    #41465   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          610       610           
  Lines        10467     10467           
  Branches      2861      2861           
=========================================
  Hits         10467     10467           
Impacted Files Coverage Δ
components/menu/style/theme.tsx 100.00% <ø> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@afc163 afc163 merged commit 87c436c into ant-design:master Mar 27, 2023
RedJue pushed a commit to RedJue/ant-design that referenced this pull request Apr 25, 2023
RedJue pushed a commit to RedJue/ant-design that referenced this pull request Apr 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants