Determining how many characters can fit on a single line of TextInput

Viewed 86

I have a TextInput that has a dynamic placeholder which can extend beyond a single line. I want to truncate this placeholder with an ellipses before it starts wrapping to the next line. The numberOfLines prop does not affect the result.

Is there a way to determine how many characters can fit on a single line of a TextInput when the width is dynamic (flex), that works with any screen size? The text does have a constant fontSize.

0 Answers
Related