Skip to content

Commit 2135fb3

Browse files
lunaleapsLuna Wei
and
Luna Wei
authored
textContentType breaking change clarification (#3624)
* Add documentation about breaking change * Better wording * Update docs/textinput.md * Update website/versioned_docs/version-0.71/textinput.md --------- Co-authored-by: Luna Wei <[email protected]>
1 parent 8568958 commit 2135fb3

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

docs/textinput.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -853,6 +853,12 @@ Possible values for `textAlign` are:
853853

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

856+
:::note
857+
[`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.
858+
859+
Avoid using both `textContentType` and `autoComplete`. For backwards compatibility, `textContentType` takes precedence when both properties are set.
860+
:::
861+
856862
For iOS 11+ you can set `textContentType` to `username` or `password` to enable autofill of login details from the device keychain.
857863

858864
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.

website/versioned_docs/version-0.71/textinput.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -853,6 +853,16 @@ Possible values for `textAlign` are:
853853

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

856+
:::note
857+
[`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.
858+
859+
Avoid using both `textContentType` and `autoComplete`.
860+
:::
861+
862+
:::caution
863+
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.
864+
:::
865+
856866
For iOS 11+ you can set `textContentType` to `username` or `password` to enable autofill of login details from the device keychain.
857867

858868
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.

0 commit comments

Comments
 (0)