Hi, im have a text area where i want to show minimum 1 line up to 4 lines depending on the content.
I only managed a workaround with line breaks but that doesn't make much sense in case there are longer sentences.
width of the textarea is responsive.
any ideas?
const lines = message?.split("\n").length || 1;
<Textarea className="h-auto">
<TextareaInput
className="font-sans text-300 leading-200"
value={message}
onChangeText={setMessage}
onKeyPress={handleKeyPress}
onEndEditing={handleSubmit}
onSubmitEditing={handleSubmit}
numberOfLines={lines > 4 ? 4 : lines}
/>
</Textarea>