Navigation Menu

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: Avatar.Group key lost #26098

Merged
merged 2 commits into from Aug 9, 2020
Merged

fix: Avatar.Group key lost #26098

merged 2 commits into from Aug 9, 2020

Conversation

xrkffgg
Copy link
Member

@xrkffgg xrkffgg commented Aug 8, 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

fix #26087

💡 Background and solution

📝 Changelog

Language Changelog
🇺🇸 English Fix the missing key of Avatar.Group.
🇨🇳 Chinese 修复 Avatar.Group key 缺失的问题。

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

@ant-design-bot
Copy link
Contributor

ant-design-bot commented Aug 8, 2020

@ant-design-bot
Copy link
Contributor

ant-design-bot commented Aug 8, 2020

@codesandbox-ci
Copy link

codesandbox-ci bot commented Aug 8, 2020

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 32a57b4:

Sandbox Source
antd reproduction template Configuration

@github-actions
Copy link
Contributor

github-actions bot commented Aug 8, 2020

Size Change: +56 B (0%)

Total Size: 799 kB

Filename Size Change
./dist/antd-with-locales.min.js 318 kB +28 B (0%)
./dist/antd.min.js 286 kB +28 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

@codecov
Copy link

codecov bot commented Aug 8, 2020

Codecov Report

Merging #26098 into master will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master   #26098   +/-   ##
=======================================
  Coverage   99.56%   99.56%           
=======================================
  Files         373      373           
  Lines        7315     7316    +1     
  Branches     2044     2042    -2     
=======================================
+ Hits         7283     7284    +1     
  Misses         32       32           
Impacted Files Coverage Δ
components/avatar/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 e7e83fb...32a57b4. Read the comment docs.

key: `avatar-key-${index}`,
});
});

const numOfChildren = childrenWithProps.length;
if (maxCount && maxCount < numOfChildren) {
Copy link
Member

Choose a reason for hiding this comment

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

没进 if 的时候直接用 children 就可以了吧?没必要 toArray 一下。

components/avatar/group.tsx Outdated Show resolved Hide resolved
@xrkffgg xrkffgg requested a review from afc163 August 9, 2020 10:21
@afc163 afc163 changed the title fix: avatargroup key lost fix: Avatar.Group key lost Aug 9, 2020
@afc163 afc163 merged commit d5ca588 into master Aug 9, 2020
@afc163 afc163 deleted the add-key branch August 9, 2020 10:54
@pr-triage pr-triage bot added the PR: merged label Aug 9, 2020
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.

antd Avatar.group doesn't accept key
3 participants