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: allow override value field name / 修复自定义value的FieldName时报错 #230

Closed
wants to merge 2 commits into from

Conversation

galaxynova1999
Copy link

when setting fieldNames value to custom field name like key , current version of Cascader will throw a warning :
在cascader中使用fieldName指定value为 'key'时, 会出现以下错误:

image

reproduce link:

CodeSandBox

Item Version
React 17.0
Antd 4.17.2

@vercel
Copy link

vercel bot commented Dec 27, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/react-component/cascader/862cP15Zwxw9FkPqzZDcGgcZTpTS
✅ Preview: https://cascader-git-fork-galaxynova1999-fix-fieldname-react-component.vercel.app

@afc163
Copy link
Member

afc163 commented Dec 29, 2021

图片

@afc163
Copy link
Member

afc163 commented Dec 29, 2021

Could you add a test case?

@galaxynova1999
Copy link
Author

Could you add a test case?

ok, it's done

@galaxynova1999
Copy link
Author

issue closed since it has already been fixed in 3.x

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.

None yet

2 participants