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

Collapse doesn't work for prop activeKey of type number and shows a warning of invalid prop in react hooks #18166

Closed
1 task done
kvedantmahajan opened this issue Aug 8, 2019 · 2 comments · Fixed by react-component/collapse#128
Assignees
Labels
🐛 Bug Ant Design Team had proved that this is a bug.

Comments

@kvedantmahajan
Copy link

kvedantmahajan commented Aug 8, 2019

  • I have searched the issues of this repository and believe that this is not a duplicate.

Reproduction link

Edit on CodeSandbox

Steps to reproduce

Just open the console of the project to see the warning due to which collapse doesn't run.

What is expected?

Prop activeKey of type number should be accepted as listed in API of Collapse component

What is actually happening?

Explained

Environment Info
antd 3.20.5
React 16.8.6
System MacOS
Browser Chrome

Prop of type string | string [] is working

@kvedantmahajan kvedantmahajan changed the title Collapse doesn't work for type number and shows a warning of invalid prop in react hooks Collapse doesn't work for prop activeKey of type number and shows a warning of invalid prop in react hooks Aug 8, 2019
@afc163
Copy link
Member

afc163 commented Aug 8, 2019

#17557

ping @thylsky

@afc163 afc163 added the 🐛 Bug Ant Design Team had proved that this is a bug. label Aug 8, 2019
@ztplz
Copy link
Contributor

ztplz commented Aug 8, 2019

https://github.com/react-component/collapse/blob/master/src/Collapse.jsx#L142
It is actually supported, it is wrong here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 Bug Ant Design Team had proved that this is a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants