RN: Consistently Throw for <Text><View /></Text>
Reviewed By: sahrens Differential Revision: D7898238 fbshipit-source-id: a2b74e691a116b1beae3c6bb266252a722aacbb1
This commit is contained in:
parent
3e534b9aab
commit
6a1b41643a
|
@ -63,10 +63,9 @@ if (__DEV__) {
|
|||
ViewToExport = React.forwardRef((props, ref) => (
|
||||
<TextAncestor.Consumer>
|
||||
{hasTextAncestor => {
|
||||
// TODO: Change iOS to behave the same as Android.
|
||||
invariant(
|
||||
!hasTextAncestor || Platform.OS !== 'android',
|
||||
'Nesting of <View> within <Text> is not supported on Android.',
|
||||
!hasTextAncestor,
|
||||
'Nesting of <View> within <Text> is not currently supported.',
|
||||
);
|
||||
return <RCTView {...props} ref={ref} />;
|
||||
}}
|
||||
|
|
|
@ -872,14 +872,6 @@ exports.examples = [
|
|||
style={styles.multiline}
|
||||
dataDetectorTypes="phoneNumber"
|
||||
/>
|
||||
<TextInput
|
||||
placeholder="multiline with children"
|
||||
multiline={true}
|
||||
enablesReturnKeyAutomatically={true}
|
||||
returnKeyType="go"
|
||||
style={styles.multiline}>
|
||||
<View style={styles.multilineChild}/>
|
||||
</TextInput>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue