react-component/collapse

Opening all Panels from the beginning

oodesign opened this issue · 4 comments

Hi!

Is there any way to have all panels as active?
I've seen defaultActiveKey and activeKey may be arrays, but not getting it to work...

Thanks!

Found it, thanks!

@oodesign do you remember how you got this to work? I'm not having much luck.

Edit: just found it! #93 / specific comment

Edit: ...but I'm still not having much luck 🤷‍♂️ defaultActiveKey={(["1"], ["3"], ["5"])} seems to only evaluate the last array.

Hi!

Sorry, I don't remember and don't have access to that project anymore, so can't check the solution.

Anyway, if that may be a number or an array, shouldn't it be something like activeKey: [ '2' , '3' , '4' ] ?

In their own examples (in simple.js), if you try the following it works fine.

setActivityKey = () => { this.setState({ activeKey: ['2','3','4'], }); }

Hope it helps!

Hey! Thanks so much for your reply! That was definitely the problem, haha, I appreciate it!