mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-24 04:16:00 +08:00
Multiline <TextInput> was fixed to match layout logic of singlelined one
Summary: Now padding, border and intinsic sizes are computed same way as for singlelined text input. Reviewed By: mmmulani Differential Revision: D5075880 fbshipit-source-id: 1bc2fd479c13a003c717b1fc3d9c69f4639d4444
This commit is contained in:
committed by
Facebook Github Bot
parent
4e40521620
commit
48650226e8
@@ -763,18 +763,39 @@ exports.examples = [
|
||||
title: 'TextInput Intrinsic Size',
|
||||
render: function() {
|
||||
return (
|
||||
<View style={{height: 80}}>
|
||||
<TextInput
|
||||
style={{
|
||||
position: 'absolute',
|
||||
fontSize: 16,
|
||||
backgroundColor: '#eeeeee',
|
||||
borderWidth: 5,
|
||||
padding: 10,
|
||||
paddingTop: 20,
|
||||
}}
|
||||
placeholder="Placeholder defines intrinsic size"
|
||||
/>
|
||||
<View>
|
||||
<Text>Singleline TextInput</Text>
|
||||
<View style={{height: 80}}>
|
||||
<TextInput
|
||||
style={{
|
||||
position: 'absolute',
|
||||
fontSize: 16,
|
||||
backgroundColor: '#eeeeee',
|
||||
borderColor: '#666666',
|
||||
borderWidth: 5,
|
||||
padding: 10,
|
||||
paddingTop: 20,
|
||||
}}
|
||||
placeholder="Placeholder defines intrinsic size"
|
||||
/>
|
||||
</View>
|
||||
<Text>Multiline TextInput</Text>
|
||||
<View style={{height: 80}}>
|
||||
<TextInput
|
||||
style={{
|
||||
position: 'absolute',
|
||||
fontSize: 16,
|
||||
backgroundColor: '#eeeeee',
|
||||
borderColor: '#666666',
|
||||
borderWidth: 5,
|
||||
padding: 10,
|
||||
paddingTop: 20,
|
||||
borderTopWidth: 20,
|
||||
}}
|
||||
multiline={true}
|
||||
placeholder="Placeholder defines intrinsic size"
|
||||
/>
|
||||
</View>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user