Adjust accordion cell hight to content

Is it possible to adjust accordion cell hight to the content so user can see it without scrolling?
In my case I expand textarea in the form placed in accordion during user typing text and I would like accordion cell automatically fit the hight of form/textarea.

There is no native approach, but you can count content’s height manually and apply this height to the accordion cell via method setHeight()