From daa6b0a1fec493e8c074c87b04ff119482bd4e9d Mon Sep 17 00:00:00 2001 From: Dan Gilbert Date: Fri, 12 Jul 2019 10:30:56 -0700 Subject: [PATCH] Update types for autoComplete prop. (#25549) Summary: I believe there's a mismatch between the type definitions and the expected prop in Android for `TextInput`'s `autoComplete` prop. * Android is expecting `autoComplete`. * JS types are expecting `autoCompleteType`. * Latest documentation documents `autoCompleteType`. Prop added here: https://github.com/facebook/react-native/commit/179d490607620a988a53aacb01031ed300d4ac66 This change updates the JS types to match what Android is expecting (`autoComplete`). Can update documentation if this is the approach we'd prefer (rather than updating Android to expect `autoCompleteType`). ## Changelog [Javascript] [Fixed] - Update types for `TextInput`'s `autoComplete` prop. Pull Request resolved: https://github.com/facebook/react-native/pull/25549 Test Plan: Before: * Pass invalid value to `TextInput`'s `autoComplete` prop, see no type errors on JS side, and Android blows up with: ```sh Invalid autocomplete option: foobar updateViewProp ViewManagersPropertyCache.java:95 setProperty ViewManagerPropertyUpdater.java:132 updateProps ViewManagerPropertyUpdater.java:51 updateProperties ViewManager.java:37 ``` After: * Pass invalid value to `TextInput`'s `autoComplete` prop, see PropType warning for `autoComplete` prop. Differential Revision: D16220809 Pulled By: mdvacca fbshipit-source-id: e25e198cbcbe721c8d71f069bba293856bf5f36d --- .../textinput/ReactTextInputManager.java | 34 +++++++++---------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactTextInputManager.java b/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactTextInputManager.java index 4d124ee4fce..11b4d950d8e 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactTextInputManager.java +++ b/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactTextInputManager.java @@ -589,39 +589,39 @@ public class ReactTextInputManager extends BaseViewManager