I currently have a React Native application with a FlatList component.
The logic I initially implemented was to display an Expand/Collapse arrow whenever the content at the 100th position in the list is not empty. However, I now realize that this approach is flawed. Changing the font size of my app or using different characters like Chinese text renders this logic ineffective. Therefore, it should not be solely based on character count.
{ alert.charAt(100) !== "" ?
arrowClicked === true ?
<Icon type='materialicons' name='arrow-drop-up' onPress={()=>{this.setFullLength()}} />
:
<Icon type='materialicons' name='arrow-drop-down' onPress={()=>{this.setFullLength()}} />
: null
}
I need a solution to detect when the text is long and being truncated instead. How can I go about implementing this? Your assistance is greatly appreciated!