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: add forwardRef to CheckBoxGroup for v3 compatibility #30039

Merged
merged 2 commits into from
Apr 8, 2021

Conversation

jameslahm
Copy link
Contributor

@jameslahm jameslahm commented Apr 7, 2021

[中文版模板 / 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

Fix #30036

💡 Background and solution

add forwardRef to CheckBoxGroup

📝 Changelog

Language Changelog
🇺🇸 English add forwardRef to Checkbox.Group for v3 compatibility
🇨🇳 Chinese Checkbox.Group 增加 forwardRef 以兼容v3

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

@github-actions
Copy link
Contributor

github-actions bot commented Apr 7, 2021

@hengkx
Copy link
Member

hengkx commented Apr 7, 2021

Please add test.

@codecov
Copy link

codecov bot commented Apr 7, 2021

Codecov Report

Merging #30039 (e488ae7) into master (aa9fac4) will not change coverage.
The diff coverage is 100.00%.

❗ Current head e488ae7 differs from pull request most recent head 96fc8f6. Consider uploading reports for the commit 96fc8f6 to get more accurate results
Impacted file tree graph

@@            Coverage Diff            @@
##            master    #30039   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          397       397           
  Lines         7519      7520    +1     
  Branches      2105      2105           
=========================================
+ Hits          7519      7520    +1     
Impacted Files Coverage Δ
components/checkbox/Group.tsx 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update aa9fac4...96fc8f6. Read the comment docs.

@jameslahm
Copy link
Contributor Author

Test case is here

it('should get div ref', () => {
mount(
<Checkbox.Group
options={['Apple', 'Pear', 'Orange']}
ref={node => {
expect(node.nodeName).toBe('DIV');
}}
/>,
);
});

@afc163 afc163 merged commit bee77c3 into ant-design:master Apr 8, 2021
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.

Checkbox.Group missing forwardRef
4 participants