react-collapse icon indicating copy to clipboard operation
react-collapse copied to clipboard

initialStyle not working

Open Jacint-Magyar opened this issue 4 years ago • 3 comments

initialStyle prop not applied on Collapse. I want to set initial height instead of the default 0, when it's NOT open. So it would appear partially open. I assumed initialStyle is for this use case as it would be very useful.

Jacint-Magyar avatar Mar 25 '21 08:03 Jacint-Magyar

It is not really necessary. Just do not ever close Collapse. Keep it open and just change your content height. Collapse will smoothly follow

nkbt avatar Mar 25 '21 11:03 nkbt

InitialStyle is not what you think it is.

See notes:

initially opened Collapse elements will be statically rendered with no animation. You can override this behaviour by using initialStyle prop

nkbt avatar Mar 25 '21 11:03 nkbt

Thank you. It works if i keep it open and only change height.

Jacint-Magyar avatar Mar 25 '21 16:03 Jacint-Magyar