Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Dropdown overlay string issue #26135

Merged
merged 1 commit into from Aug 11, 2020
Merged

fix: Dropdown overlay string issue #26135

merged 1 commit into from Aug 11, 2020

Conversation

afc163
Copy link
Member

@afc163 afc163 commented Aug 11, 2020

[中文版模板 / 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
  • Other (about what?)

🔗 Related issue link

close #26134

💡 Background and solution

📝 Changelog

Language Changelog
🇺🇸 English Fix Dropdown render issue when overlay is string.
🇨🇳 Chinese 修复 Dropdown overlay 是 string 时渲染错误的问题。

☑️ Self Check before Merge

⚠️ Please check all items below before review. ⚠️

  • 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

@@ -87,7 +87,7 @@ const Dropdown: DropdownInterface = props => {
overlayNode = overlay;
}
overlayNode = React.Children.only(
typeof overlayNode === 'string' ? <span>overlayNode</span> : overlayNode,
typeof overlayNode === 'string' ? <span>{overlayNode}</span> : overlayNode,
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

低级错误..

@ant-design-bot
Copy link
Contributor

ant-design-bot commented Aug 11, 2020

@ant-design-bot
Copy link
Contributor

ant-design-bot commented Aug 11, 2020

@github-actions
Copy link
Contributor

Size Change: -8 B (0%)

Total Size: 799 kB

Filename Size Change
./dist/antd-with-locales.min.js 317 kB -4 B (0%)
./dist/antd.min.js 286 kB -4 B (0%)
ℹ️ View Unchanged
Filename Size Change
./dist/antd.compact.min.css 64.8 kB 0 B
./dist/antd.dark.min.css 66 kB 0 B
./dist/antd.min.css 64.8 kB 0 B

compressed-size-action

@afc163 afc163 merged commit 9f94744 into master Aug 11, 2020
@afc163 afc163 deleted the fix-dropdown-string branch August 11, 2020 09:43
@pr-triage pr-triage bot added the PR: merged label Aug 11, 2020
@codesandbox-ci
Copy link

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 9ae2335:

Sandbox Source
antd reproduction template Configuration

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.

Dropdown overlay as string wrong output
3 participants