Skip to content

Commit

Permalink
Map textContentType strings to Objective-C constants (#22579)
Browse files Browse the repository at this point in the history
Summary:
Fixes #22578

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: facebook/react-native#22579

Differential Revision: D13402177

Pulled By: shergin

fbshipit-source-id: 55f4a2029cd3ea1fb4834e9f56d2df5a05b31b4e
  • Loading branch information
levibuzolic authored and facebook-github-bot committed Dec 10, 2018
1 parent 6b37500 commit 55d8447
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions js/TextInputExample.ios.js
Original file line number Diff line number Diff line change
Expand Up @@ -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>
);
},
},
];

0 comments on commit 55d8447

Please sign in to comment.