File tree Expand file tree Collapse file tree 2 files changed +21
-3
lines changed
packages/react-native/Libraries/Components/TextInput Expand file tree Collapse file tree 2 files changed +21
-3
lines changed Original file line number Diff line number Diff line change @@ -70,6 +70,15 @@ export type ReturnKeyTypeOptions =
7070 | ReturnKeyTypeAndroid
7171 | ReturnKeyTypeIOS ;
7272
73+ export type EnterKeyHintTypeAndroid = 'previous' ;
74+ export type EnterKeyHintTypeIOS = 'enter' ;
75+ export type EnterKeyHintType = 'done' | 'go' | 'next' | 'search' | 'send' ;
76+
77+ export type EnterKeyHintTypeOptions =
78+ | EnterKeyHintType
79+ | EnterKeyHintTypeAndroid
80+ | EnterKeyHintTypeIOS ;
81+
7382type DataDetectorTypes =
7483 | 'phoneNumber'
7584 | 'link'
@@ -779,6 +788,12 @@ export interface TextInputProps
779788 */
780789 returnKeyType ?: ReturnKeyTypeOptions | undefined ;
781790
791+ /**
792+ * Determines what text should be shown to the return key on virtual keyboards.
793+ * Has precedence over the returnKeyType prop.
794+ */
795+ enterKeyHint ?: EnterKeyHintTypeOptions | undefined ;
796+
782797 /**
783798 * If true, the text input obscures the text entered so that sensitive text like passwords stay secure.
784799 * The default value is false.
Original file line number Diff line number Diff line change @@ -223,13 +223,16 @@ export type TextContentType =
223223 | 'oneTimeCode' ;
224224
225225export type enterKeyHintType =
226- | 'enter'
226+ // Cross Platform
227227 | 'done'
228228 | 'go'
229229 | 'next'
230- | 'previous'
231230 | 'search'
232- | 'send' ;
231+ | 'send'
232+ // Android-only
233+ | 'previous'
234+ // iOS-only
235+ | 'enter' ;
233236
234237type PasswordRules = string ;
235238
You can’t perform that action at this time.
0 commit comments