mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Map TextInput textContentType strings to Objective-C constants (#22611)
Summary: This is an updated version of #22579 which uses compile conditionals to prevent `use of undeclared identifier` errors when compiling on older versions of Xcode. -------- Currently the only `textContentType` values that work are: `username`, `password`, `location`, `name` and `nickname`. This is due to the strings provided by React Native not matching up with the underlying string constants used in iOS (with the exception of the aforementioned types). Issue #22578 has more detail examples/explanation. Pull Request resolved: https://github.com/facebook/react-native/pull/22611 Differential Revision: D13460949 Pulled By: cpojer fbshipit-source-id: e6d1108422b850ebc3aea05693ed05118b77b5de
This commit is contained in:
committed by
Mike Grabowski
parent
40603bc9c4
commit
dff3f609f4
@@ -1085,4 +1085,19 @@ exports.examples = [
|
||||
);
|
||||
},
|
||||
},
|
||||
{
|
||||
title: 'Text Content Type',
|
||||
render: function() {
|
||||
return (
|
||||
<View>
|
||||
<WithLabel label="emailAddress">
|
||||
<TextInput textContentType="emailAddress" style={styles.default} />
|
||||
</WithLabel>
|
||||
<WithLabel label="name">
|
||||
<TextInput textContentType="name" style={styles.default} />
|
||||
</WithLabel>
|
||||
</View>
|
||||
);
|
||||
},
|
||||
},
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user