Closed sabatsu closed 7 years ago
I have an example code https://github.com/shepherdwind/sample-collapse-1/blob/issue-47/simple.jsx , you can try this demo. I don't find any problem.
Thanks. Whats weird is that it tries to close, and goes up for a half of a second and then it really fast re-open again. So I think maybe it is connected to conflict between 2 scripts or css or something. Can I send you a 5 sec video that you will see what I experience?
Ok, a video will be helpful. And also tell me how can I reproduce what you say. Maybe you need change the example code , give me all your code, so I can reproduce it.
I'm having the same issue as well.
I found that you need to import css from the example here: http://react-component.github.io/collapse/examples/simple.html
I resolved this issue by adding:
import 'rc-collapse/assets/index.css';
So, looks like you need to have the .rc-collapse-content-inactive
class with display: none
, otherwise it will not work.
Ideally this style should be applied by the component using React inline styles.
I have react js app with rc-collapse. I think I built it right. I am managing the state of the activeKey with the onChange handler and seems ok. But the panels wont close, they do open onclick but wont close.
managing the state on panel click:
initialzing the state:
When I console.log the activeKey state I get the correct answer - each click on a panel changes the state from active to not active. But the panel isn't closing.