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

chore: Col support key if user providered #18578

Merged
merged 1 commit into from Aug 30, 2019

Conversation

@zombieJ
Copy link
Member

commented Aug 30, 2019

🤔 This is a ...

  • New feature
  • Bug fix
  • Site / document update
  • Component style update
  • TypeScript definition update
  • Refactoring
  • Code style optimization
  • Test Case
  • Branch merge
  • Other (about what?)

🔗 Related issue link

close #18408

💡 Background and solution

📝 Changelog

Language Changelog
🇺🇸 English Description.Item will reuse key in render if user provided.
🇨🇳 Chinese Description.Item 在渲染时会复用用户提供的 key。

☑️ Self Check before Merge

  • 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

@pr-triage pr-triage bot added the PR: unreviewed label Aug 30, 2019

@tests-checker
Copy link

left a comment

Could you please add tests to make sure this change works as expected?

@netlify

This comment has been minimized.

Copy link

commented Aug 30, 2019

Deploy preview for ant-design ready!

Built with commit 04bdb67

https://deploy-preview-18578--ant-design.netlify.com

@codecov

This comment has been minimized.

Copy link

commented Aug 30, 2019

Codecov Report

Merging #18578 into master will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #18578      +/-   ##
==========================================
+ Coverage   96.73%   96.73%   +<.01%     
==========================================
  Files         280      280              
  Lines        7531     7534       +3     
  Branches     2055     2098      +43     
==========================================
+ Hits         7285     7288       +3     
  Misses        244      244              
  Partials        2        2
Impacted Files Coverage Δ
components/descriptions/index.tsx 98.82% <100%> (+0.04%) ⬆️

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 93c0fc1...04bdb67. Read the comment docs.

@zombieJ zombieJ merged commit 4dfed8d into master Aug 30, 2019

29 of 32 checks passed

Build
Details
License Compliance FOSSA is analyzing this commit
Details
Header rules - ant-design No header rules processed
Details
Pages changed - ant-design 214 new files uploaded
Details
DEP All dependencies are resolved
LGTM analysis: JavaScript No new or fixed alerts
Details
Mixed content - ant-design No mixed content detected
Details
Redirect rules - ant-design 18 redirect rules processed
Details
Semantic Pull Request ready to be squashed
Details
WIP Ready for review
Details
ant-design.ant-design #ant design succeeded
Details
buildsize No change
Details
bundlesize Total bundle size is 582.42KB/600KB (-null)
Details
ci/circleci: check_metadata Your tests passed on CircleCI!
Details
ci/circleci: compile Your tests passed on CircleCI!
Details
ci/circleci: dist Your tests passed on CircleCI!
Details
ci/circleci: lint Your tests passed on CircleCI!
Details
ci/circleci: setup Your tests passed on CircleCI!
Details
ci/circleci: test_dist Your tests passed on CircleCI!
Details
ci/circleci: test_dist_15 Your tests passed on CircleCI!
Details
ci/circleci: test_dom Your tests passed on CircleCI!
Details
ci/circleci: test_dom_15 Your tests passed on CircleCI!
Details
ci/circleci: test_es Your tests passed on CircleCI!
Details
ci/circleci: test_es_15 Your tests passed on CircleCI!
Details
ci/circleci: test_lib Your tests passed on CircleCI!
Details
ci/circleci: test_lib_15 Your tests passed on CircleCI!
Details
ci/circleci: test_node Your tests passed on CircleCI!
Details
ci/circleci: test_node_15 Your tests passed on CircleCI!
Details
codecov/patch 100% of diff hit (target 96.73%)
Details
codecov/project 96.73% (+<.01%) compared to 93c0fc1
Details
netlify/ant-design/deploy-preview Deploy preview ready!
Details
security/snyk - package.json (paranoidjk) No manifest changes detected

@zombieJ zombieJ deleted the descs-key branch Aug 30, 2019

@chenshuai2144 chenshuai2144 referenced this pull request Sep 2, 2019
5 of 14 tasks complete
@travikk

This comment has been minimized.

Copy link

commented Sep 3, 2019

@zombieJ This introduced a bug now. React keeps complaining about having children with the same key. Reason is, the same key is applied to label and content:

key={colItem.key || idx}

key used to be prefixed with the type of the cell, like so:

key={`${type}-${idx}`}

Can we change it to something like:

const cellKey = colItem.key || idx

return (
   <Col
      key={`${type}_${cellKey}`}
      ...
    />
);
@zombieJ

This comment has been minimized.

Copy link
Member Author

commented Sep 3, 2019

hi @travikk, could you help to create an issue for this?

@Swind

This comment has been minimized.

Copy link

commented Sep 3, 2019

Hi @zombieJ,

I create a ticket #18633 about this issue.

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.