react-component / collapse

React Collapse / Accordion
http://react-component.github.io/collapse/
MIT License
324 stars 134 forks source link

fix: number type activeKeys not working #128

Closed ztplz closed 5 years ago

ztplz commented 5 years ago

close https://github.com/ant-design/ant-design/issues/18166

ztplz commented 5 years ago

@afc163 @zombieJ

coveralls commented 5 years ago

Coverage Status

Coverage remained the same at 93.684% when pulling c08ef71cf1e7ef8829547fc79f7a6dbacaf82190 on ztplz:warning into c1c956bb3e59b0cdafb87a4c03825fef55975c36 on react-component:master.

afc163 commented 5 years ago

ant-design/ant-design#18166 不只是 warning 的问题,activeKey 没有生效。

ztplz commented 5 years ago

那这是另外一个bug

afc163 commented 5 years ago

可以一起修掉。

ztplz commented 5 years ago

Done. react会把用户的number类型的key都变成字符串,但是我们设置activekey的逻辑是比的是用户的key和react元素的key 我把用户的key再内部也变成字符串了

afc163 commented 5 years ago

补个用例吧,免得改挂