Reputation: 51
Documentation says I can use same style for TextInput as for Text. While setting ie. lineHeight on Text has proper effect, doing so for TextInput just doesn't work.
There's no error though, which should be shown if I used not valid style property.
I'm intrested in workaround for this, even if it would require some Obj-C.
Upvotes: 5
Views: 7140
Reputation: 9684
I'm not sure whether this will be fixed in 18.0-rc or 15.0-rc, but looks like Nick Lockwood fixes this in commit: 06a44a31. The trick is to nest a <Text>
element inside of the <TextInput>
element.
<TextInput
multiline={true}
style={styles.multiline}
onChangeText={(text) => {
this.setState({text});
}}
>
<Text>{parts}</Text>
</TextInput>
Upvotes: 2