Skip to content

Commit f2e2321

Browse files
Christian Ruinkfacebook-github-bot
authored andcommitted
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
1 parent 6915fce commit f2e2321

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

Libraries/Components/TextInput/TextInput.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -392,6 +392,14 @@ type AndroidProps = $ReadOnly<{|
392392
| 'off'
393393
),
394394

395+
/**
396+
* When provided it will set the color of the cursor (or "caret") in the component.
397+
* Unlike the behavior of `selectionColor` the cursor color will be set independently
398+
* from the color of the text selection box.
399+
* @platform android
400+
*/
401+
cursorColor?: ?ColorValue,
402+
395403
/**
396404
* When `false`, if there is a small amount of space available around a text input
397405
* (e.g. landscape orientation on a phone), the OS may choose to have the user edit

0 commit comments

Comments
 (0)