Closed pierroo closed 1 year ago
Thanks for bringing this up @pierroo , would it be fine if onReady
callback passes this information in arguments ?
Absolutely, that's exactly where I was hoping to get those information from. Thank you!
Hi @pierroo , I've manged to add params to onReady
callback ({ canExpand, expandedLinesCount })
.
As for the size, the text component will fill the parent component width and the height can be proportional to expandedLinesCount * font size
. Hope this helps.
Upgrade to ver 3.0.3 to see the changes
I am using the controlled collapse, so that when the user taps on the entire parent view it expand the contained text. But as of now there is no way to know whether or not there is any need to expand (ie nbOfLines > the number we set as props), which leads to a useless tap to expand. (in my case it triggers other functions, like adjusting the css top etc; so I really don't want to have it triggered when not needed)
Let me know if unclear :)
EDIT: and while at it, anyway to also return the "size" (width and height) of the collapsed text? I guess you compute it somehow to adjust the animated height and width upon expanding? This size would help me to "place" (top / bottom etc) the actually expanding text.