From 11fb0b7d1832092401184f8a3b6b8717b3580bdf Mon Sep 17 00:00:00 2001 From: Gabriel Donadel Dall'Agnol Date: Mon, 22 Aug 2022 14:05:44 -0300 Subject: [PATCH] chore: Map none inputMode to default keyboardType --- Libraries/Components/TextInput/TextInput.js | 3 +++ .../rn-tester/js/examples/TextInput/TextInputSharedExamples.js | 1 + 2 files changed, 4 insertions(+) diff --git a/Libraries/Components/TextInput/TextInput.js b/Libraries/Components/TextInput/TextInput.js index 7d454465f4624d..eaff7f55daf4a7 100644 --- a/Libraries/Components/TextInput/TextInput.js +++ b/Libraries/Components/TextInput/TextInput.js @@ -156,6 +156,7 @@ export type KeyboardType = | 'visible-password'; export type InputMode = + | 'none' | 'text' | 'decimal' | 'numeric' @@ -551,6 +552,7 @@ export type Props = $ReadOnly<{| * * Support the following values: * + * - `none` * - `text` * - `decimal` * - `numeric` @@ -1399,6 +1401,7 @@ function InternalTextInput(props: Props): React.Node { } const inputModeToKeyboardTypeMap = { + none: 'default', text: 'default', decimal: 'decimal-pad', numeric: 'number-pad', diff --git a/packages/rn-tester/js/examples/TextInput/TextInputSharedExamples.js b/packages/rn-tester/js/examples/TextInput/TextInputSharedExamples.js index cd7c791b7a74b8..d7a7d4f5ccd62c 100644 --- a/packages/rn-tester/js/examples/TextInput/TextInputSharedExamples.js +++ b/packages/rn-tester/js/examples/TextInput/TextInputSharedExamples.js @@ -726,6 +726,7 @@ module.exports = ([ name: 'inputModes', render: function (): React.Node { const inputMode = [ + 'none', 'text', 'decimal', 'numeric',