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 should not block ref #44971

Merged
merged 1 commit into from Sep 20, 2023
Merged

fix: dropdown should not block ref #44971

merged 1 commit into from Sep 20, 2023

Conversation

zombieJ
Copy link
Member

@zombieJ zombieJ commented Sep 20, 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

resolve #44965

💡 Background and solution

📝 Changelog

Language Changelog
🇺🇸 English Fix Dropdown can not give ref for the root children rendered by dropdownRender.
🇨🇳 Chinese 修复 Dropdown 通过 dropdownRender 渲染的子节点配置 ref 不生效的问题。

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

🤖 Generated by Copilot at d3c83da

Fixed a focus bug in menu items and added a test case for the dropdownRender prop. Improved the code quality of OverrideContext.tsx by using a custom hook.

🔍 Walkthrough

🤖 Generated by Copilot at d3c83da

  • Using useComposeRef hook to merge multiple refs into one in OverrideProvider component (link, link)
  • Adding a test case to verify the ref is accessible in dropdownRender prop (link)
  • Reorder import statements to group type imports together and separate them from default imports in index.test.tsx (link)

@stackblitz
Copy link

stackblitz bot commented Sep 20, 2023

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@github-actions
Copy link
Contributor

github-actions bot commented Sep 20, 2023

@github-actions
Copy link
Contributor

size-limit report 📦

Path Size
./dist/antd.min.js 394.34 KB (+16 B 🔺)
./dist/antd-with-locales.min.js 453.55 KB (+20 B 🔺)

@argos-ci
Copy link

argos-ci bot commented Sep 20, 2023

The latest updates on your projects. Learn more about Argos notifications ↗︎

Build Status Details Updated (UTC)
default (Inspect) ✅ No change detected - Sep 20, 2023, 8:02 AM

@codecov
Copy link

codecov bot commented Sep 20, 2023

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (5c99a5e) 100.00% compared to head (d3c83da) 100.00%.
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff            @@
##            master    #44971   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          682       682           
  Lines        11547     11548    +1     
  Branches      3105      3105           
=========================================
+ Hits         11547     11548    +1     
Files Changed Coverage Δ
components/menu/OverrideContext.tsx 100.00% <100.00%> (ø)

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@zombieJ zombieJ merged commit d03977b into master Sep 20, 2023
94 checks passed
@zombieJ zombieJ deleted the fix-ref branch September 20, 2023 08:30
@zombieJ zombieJ mentioned this pull request Sep 25, 2023
16 tasks
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组件dropdownRender属性根元素无法获取ref
3 participants