From f2e23215ca14c3c630aa931cdd114187589ac0fb Mon Sep 17 00:00:00 2001 From: Christian Ruink Date: Tue, 10 May 2022 16:48:20 -0700 Subject: [PATCH] Adding missing prop for RN Android TextInput behavior Summary: An issue that popped up working on: D36140890 There is already behavior implemented to set the TextInput caret/cursor color independently from the selection box color in Android. However this handy prop, was not documented or added as one of the available props for the TextInput component. Associated behavior can be found here: https://www.internalfb.com/code/fbsource/[f116d651b2e8]/xplat/js/react-native-github/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactTextInputManager.java?lines=512 ## **Changelog** [Android] - Add android-only prop documentation at the TextInput js level. Reviewed By: genkikondo Differential Revision: D36208656 fbshipit-source-id: a54a2646351d897e0d598d5e1979f2a0c443e9d6 --- Libraries/Components/TextInput/TextInput.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Libraries/Components/TextInput/TextInput.js b/Libraries/Components/TextInput/TextInput.js index 614e24fc3f63ae..6050fa4cc9f79a 100644 --- a/Libraries/Components/TextInput/TextInput.js +++ b/Libraries/Components/TextInput/TextInput.js @@ -392,6 +392,14 @@ type AndroidProps = $ReadOnly<{| | 'off' ), + /** + * When provided it will set the color of the cursor (or "caret") in the component. + * Unlike the behavior of `selectionColor` the cursor color will be set independently + * from the color of the text selection box. + * @platform android + */ + cursorColor?: ?ColorValue, + /** * 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