Is there a way to make label prop in react native paper text input occupy more than one line?

83 Views Asked by At

I'm using the TextInput component from the React Native Paper library. If the label is too long it shows an ellipsis at the end instead of wrapping the text to the next line.

I tried adding a custom component to the label prop with numberOfLines={2}. But it isn't working.

Here is the TextInput component

<TextInput
    label={
    <Text numberOfLines={2}>{Strings.banks_count_associated_with_ucv_lending}</Text>
    }
    value={formData$.peek()[PROFILE_FORM_FIELDS.ASSOCIATED_BANKS_COUNT] as string}
    onChangeText={(text) => updateFormData({key: PROFILE_FORM_FIELDS.ASSOCIATED_BANKS_COUNT, value: text})}
    required={true}
    outlineColor={colors.opacity_1}
    style={{height: 100, textAlignVertical: 'top'}}
    keyboardType="numeric"
/>
0

There are 0 best solutions below