Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

textContentType breaking change clarification #3624

Merged
merged 4 commits into from
Mar 29, 2023
Merged
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
6 changes: 6 additions & 0 deletions docs/textinput.md
Original file line number Diff line number Diff line change
Expand Up @@ -853,6 +853,12 @@ Possible values for `textAlign` are:

Give the keyboard and the system information about the expected semantic meaning for the content that users enter.

:::note
[`autoComplete`](#autocomplete), provides the same functionality and is available for all platforms. You can use [`Platform.select`](/docs/next/platform#select) for differing platform behaviors.

Avoid using both `textContentType` and `autoComplete`. For backwards compatibility, `textContentType` takes precedence when both properties are set.
:::

For iOS 11+ you can set `textContentType` to `username` or `password` to enable autofill of login details from the device keychain.

For iOS 12+ `newPassword` can be used to indicate a new password input the user may want to save in the keychain, and `oneTimeCode` can be used to indicate that a field can be autofilled by a code arriving in an SMS.
Expand Down
10 changes: 10 additions & 0 deletions website/versioned_docs/version-0.71/textinput.md
Original file line number Diff line number Diff line change
Expand Up @@ -853,6 +853,16 @@ Possible values for `textAlign` are:

Give the keyboard and the system information about the expected semantic meaning for the content that users enter.

:::note
[`autoComplete`](#autocomplete), introduced to iOS in 0.71, provides the same functionality and is available for all platforms. You can use [`Platform.select`](/docs/platform#select) for differing platform behaviors.

Avoid using both `textContentType` and `autoComplete`.
:::

:::caution
A breaking change was introduced in 0.71 where `autoComplete` overrides `textContentType` on iOS when both properties are set. >=0.71.5 reverts the breaking change such that `textContentType` takes precedence.
:::

For iOS 11+ you can set `textContentType` to `username` or `password` to enable autofill of login details from the device keychain.

For iOS 12+ `newPassword` can be used to indicate a new password input the user may want to save in the keychain, and `oneTimeCode` can be used to indicate that a field can be autofilled by a code arriving in an SMS.
Expand Down