Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
70 changes: 59 additions & 11 deletions Libraries/Components/TextInput/AndroidTextInputNativeComponent.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,42 +73,90 @@ export type NativeProps = $ReadOnly<{|
* Android props after this
*/
/**
* Determines which content to suggest on auto complete, e.g.`username`.
* To disable auto complete, use `off`.
* Specifies autocomplete hints for the system, so it can provide autofill. On Android, the system will always attempt to offer autofill by using heuristics to identify the type of content.
* To disable autocomplete, set `autoComplete` to `off`.
*
* *Android Only*
*
* The following values work on Android only:
* Possible values for `autoComplete` are:
*
* - `username`
* - `password`
* - `email`
* - `name`
* - `tel`
* - `street-address`
* - `postal-code`
* - `cc-number`
* - `birthdate-day`
* - `birthdate-full`
* - `birthdate-month`
* - `birthdate-year`
* - `cc-csc`
* - `cc-exp`
* - `cc-exp-day`
* - `cc-exp-month`
* - `cc-exp-year`
* - `cc-number`
* - `email`
* - `gender`
* - `name`
* - `name-family`
* - `name-given`
* - `name-middle`
* - `name-middle-initial`
* - `name-prefix`
* - `name-suffix`
* - `password`
* - `password-new`
* - `postal-address`
* - `postal-address-country`
* - `postal-address-extended`
* - `postal-address-extended-postal-code`
* - `postal-address-locality`
* - `postal-address-region`
* - `postal-code`
* - `street-address`
* - `sms-otp`
* - `tel`
* - `tel-country-code`
* - `tel-national`
* - `tel-device`
* - `username`
* - `username-new`
* - `off`
*
* @platform android
*/
autoComplete?: WithDefault<
| 'birthdate-day'
| 'birthdate-full'
| 'birthdate-month'
| 'birthdate-year'
| 'cc-csc'
| 'cc-exp'
| 'cc-exp-day'
| 'cc-exp-month'
| 'cc-exp-year'
| 'cc-number'
| 'email'
| 'gender'
| 'name'
| 'name-family'
| 'name-given'
| 'name-middle'
| 'name-middle-initial'
| 'name-prefix'
| 'name-suffix'
| 'password'
| 'password-new'
| 'postal-address'
| 'postal-address-country'
| 'postal-address-extended'
| 'postal-address-extended-postal-code'
| 'postal-address-locality'
| 'postal-address-region'
| 'postal-code'
| 'street-address'
| 'sms-otp'
| 'tel'
| 'tel-country-code'
| 'tel-national'
| 'tel-device'
| 'username'
| 'username-new'
| 'off',
'off',
>,
Expand Down
46 changes: 35 additions & 11 deletions Libraries/Components/TextInput/TextInput.js
Original file line number Diff line number Diff line change
Expand Up @@ -305,25 +305,49 @@ type IOSProps = $ReadOnly<{|

type AndroidProps = $ReadOnly<{|
/**
* Determines which content to suggest on auto complete, e.g.`username`.
* To disable auto complete, use `off`.
* Specifies autocomplete hints for the system, so it can provide autofill. On Android, the system will always attempt to offer autofill by using heuristics to identify the type of content.
* To disable autocomplete, set `autoComplete` to `off`.
*
* *Android Only*
*
* The following values work on Android only:
* Possible values for `autoComplete` are:
*
* - `username`
* - `password`
* - `email`
* - `name`
* - `tel`
* - `street-address`
* - `postal-code`
* - `cc-number`
* - `birthdate-day`
* - `birthdate-full`
* - `birthdate-month`
* - `birthdate-year`
* - `cc-csc`
* - `cc-exp`
* - `cc-exp-day`
* - `cc-exp-month`
* - `cc-exp-year`
* - `cc-number`
* - `email`
* - `gender`
* - `name`
* - `name-family`
* - `name-given`
* - `name-middle`
* - `name-middle-initial`
* - `name-prefix`
* - `name-suffix`
* - `password`
* - `password-new`
* - `postal-address`
* - `postal-address-country`
* - `postal-address-extended`
* - `postal-address-extended-postal-code`
* - `postal-address-locality`
* - `postal-address-region`
* - `postal-code`
* - `street-address`
* - `sms-otp`
* - `tel`
* - `tel-country-code`
* - `tel-national`
* - `tel-device`
* - `username`
* - `username-new`
* - `off`
*
* @platform android
Expand Down
94 changes: 83 additions & 11 deletions Libraries/DeprecatedPropTypes/DeprecatedTextInputPropTypes.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,56 +41,128 @@ module.exports = {
'characters',
]): React$PropType$Primitive<'none' | 'sentences' | 'words' | 'characters'>),
/**
* Determines which content to suggest on auto complete, e.g.`username`.
* To disable auto complete, use `off`.
* Specifies autocomplete hints for the system, so it can provide autofill. On Android, the system will always attempt to offer autofill by using heuristics to identify the type of content.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rephrasing @yungsters 's internal comment:
You may want to make a PR for the deprecated prop-types package

* To disable autocomplete, set `autoComplete` to `off`.
*
* *Android Only*
*
* The following values work on Android only:
* Possible values for `autoComplete` are:
*
* - `username`
* - `password`
* - `email`
* - `name`
* - `tel`
* - `street-address`
* - `postal-code`
* - `cc-number`
* - `birthdate-day`
* - `birthdate-full`
* - `birthdate-month`
* - `birthdate-year`
* - `cc-csc`
* - `cc-exp`
* - `cc-exp-day`
* - `cc-exp-month`
* - `cc-exp-year`
* - `cc-number`
* - `email`
* - `gender`
* - `name`
* - `name-family`
* - `name-given`
* - `name-middle`
* - `name-middle-initial`
* - `name-prefix`
* - `name-suffix`
* - `password`
* - `password-new`
* - `postal-address`
* - `postal-address-country`
* - `postal-address-extended`
* - `postal-address-extended-postal-code`
* - `postal-address-locality`
* - `postal-address-region`
* - `postal-code`
* - `street-address`
* - `sms-otp`
* - `tel`
* - `tel-country-code`
* - `tel-national`
* - `tel-device`
* - `username`
* - `username-new`
* - `off`
*
* @platform android
*/
autoComplete: (PropTypes.oneOf([
'birthdate-day',
'birthdate-full',
'birthdate-month',
'birthdate-year',
'cc-csc',
'cc-exp',
'cc-exp-day',
'cc-exp-month',
'cc-exp-year',
'cc-number',
'email',
'gender',
'name',
'name-family',
'name-given',
'name-middle',
'name-middle-initial',
'name-prefix',
'name-suffix',
'password',
'password-new',
'postal-address',
'postal-address-country',
'postal-address-extended',
'postal-address-extended-postal-code',
'postal-address-locality',
'postal-address-region',
'postal-code',
'street-address',
'sms-otp',
'tel',
'tel-country-code',
'tel-national',
'tel-device',
'username',
'username-new',
'off',
]): React$PropType$Primitive<
| 'birthdate-day'
| 'birthdate-full'
| 'birthdate-month'
| 'birthdate-year'
| 'cc-csc'
| 'cc-exp'
| 'cc-exp-day'
| 'cc-exp-month'
| 'cc-exp-year'
| 'cc-number'
| 'email'
| 'gender'
| 'name'
| 'name-family'
| 'name-given'
| 'name-middle'
| 'name-middle-initial'
| 'name-prefix'
| 'name-suffix'
| 'password'
| 'password-new'
| 'postal-address'
| 'postal-address-country'
| 'postal-address-extended'
| 'postal-address-extended-postal-code'
| 'postal-address-locality'
| 'postal-address-region'
| 'postal-code'
| 'street-address'
| 'sms-otp'
| 'tel'
| 'tel-country-code'
| 'tel-national'
| 'tel-device'
| 'username'
| 'username-new'
| 'off',
>),
/**
Expand Down