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: key type mismatch #691

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

madocto
Copy link
Contributor

@madocto madocto commented Mar 18, 2024

Copy link

codecov bot commented Mar 18, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.58%. Comparing base (4ae012f) to head (606fa0e).

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #691   +/-   ##
=======================================
  Coverage   99.58%   99.58%           
=======================================
  Files          27       27           
  Lines         721      722    +1     
  Branches      196      198    +2     
=======================================
+ Hits          718      719    +1     
  Misses          3        3           

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

@@ -13,33 +13,35 @@ function convertItemsToNodes(list: ItemType[]) {
if (opt && typeof opt === 'object') {
const { label, children, key, type, ...restProps } = opt as any;
const mergedKey = key ?? `tmp-${index}`;
// The type of `key` changes, `eventKey` is the original value
const mergeProps = { ...restProps, key: mergedKey, eventKey: mergedKey };
Copy link
Member

Choose a reason for hiding this comment

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

...restProps 放后面比较匹配之前的效果

@MadCcc
Copy link
Member

MadCcc commented Mar 22, 2024

⚠️ 这个 PR 存在 breaking change 风险,如果用户 bug as feature 就会有问题

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.

3 participants