mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-06-28 22:30:01 +00:00
[react-native] Added autoCompleteType to TextInputAndroidProps (#34824)
See https://github.com/facebook/react-native/pull/21575
This commit is contained in:
committed by
Eloy Durán
parent
10aca63078
commit
4d231b322c
37
types/react-native/index.d.ts
vendored
37
types/react-native/index.d.ts
vendored
@@ -1107,6 +1107,43 @@ export interface TextInputIOSProps {
|
||||
* @see https://facebook.github.io/react-native/docs/textinput.html#props
|
||||
*/
|
||||
export interface TextInputAndroidProps {
|
||||
/**
|
||||
* Determines which content to suggest on auto complete, e.g.`username`.
|
||||
* To disable auto complete, use `off`.
|
||||
*
|
||||
* *Android Only*
|
||||
*
|
||||
* The following values work on Android only:
|
||||
*
|
||||
* - `username`
|
||||
* - `password`
|
||||
* - `email`
|
||||
* - `name`
|
||||
* - `tel`
|
||||
* - `street-address`
|
||||
* - `postal-code`
|
||||
* - `cc-number`
|
||||
* - `cc-csc`
|
||||
* - `cc-exp`
|
||||
* - `cc-exp-month`
|
||||
* - `cc-exp-year`
|
||||
* - `off`
|
||||
*/
|
||||
autoCompleteType?:
|
||||
| "cc-csc"
|
||||
| "cc-exp"
|
||||
| "cc-exp-month"
|
||||
| "cc-exp-year"
|
||||
| "cc-number"
|
||||
| "email"
|
||||
| "name"
|
||||
| "password"
|
||||
| "postal-code"
|
||||
| "street-address"
|
||||
| "tel"
|
||||
| "username"
|
||||
| "off";
|
||||
|
||||
/**
|
||||
* When false, if there is a small amount of space available around a text input (e.g. landscape orientation on a phone),
|
||||
* the OS may choose to have the user edit the text inside of a full screen text input mode.
|
||||
|
||||
@@ -641,6 +641,7 @@ class TextInputTest extends React.Component<{}, { username: string }> {
|
||||
<TextInput
|
||||
ref={input => (this.username = input)}
|
||||
textContentType="username"
|
||||
autoCompleteType="username"
|
||||
value={this.state.username}
|
||||
onChangeText={this.handleUsernameChange}
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user