Files
react-native/Libraries/Components/TextInput/AndroidTextInputViewConfig.js
T
jeswinsimon 8066bc9ff6 Updated TextInput autoCompleteType prop to autoComplete 1/2 (#26010)
Summary:
Fix for bug https://github.com/facebook/react-native/issues/26003 Rename TextInput prop "autoCompleteType" to "autoComplete".

## Changelog

[Android] [Changed] - Updated `autoCompleteType` prop of `TextInput` to `autoComplete`

Pull Request resolved: https://github.com/facebook/react-native/pull/26010

Test Plan:
Test Pass

PR for [Doc Update](https://github.com/facebook/react-native-website/pull/1184)

Reviewed By: mdvacca

Differential Revision: D29980220

Pulled By: lunaleaps

fbshipit-source-id: 3c9e7d3250b5f95b0dbd523fdb0d917a039cd6a9
2021-07-30 03:16:35 -07:00

117 lines
3.1 KiB
JavaScript

/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @flow strict-local
* @format
*/
import ReactNativeViewViewConfig from '../../Components/View/ReactNativeViewViewConfig';
import type {PartialViewConfig} from 'react-native/Libraries/Renderer/shims/ReactNativeTypes';
const AndroidTextInputViewConfig = {
uiViewClassName: 'AndroidTextInput',
bubblingEventTypes: {
topBlur: {
phasedRegistrationNames: {
bubbled: 'onBlur',
captured: 'onBlurCapture',
},
},
topEndEditing: {
phasedRegistrationNames: {
bubbled: 'onEndEditing',
captured: 'onEndEditingCapture',
},
},
topFocus: {
phasedRegistrationNames: {
bubbled: 'onFocus',
captured: 'onFocusCapture',
},
},
topKeyPress: {
phasedRegistrationNames: {
bubbled: 'onKeyPress',
captured: 'onKeyPressCapture',
},
},
topSubmitEditing: {
phasedRegistrationNames: {
bubbled: 'onSubmitEditing',
captured: 'onSubmitEditingCapture',
},
},
topTextInput: {
phasedRegistrationNames: {
bubbled: 'onTextInput',
captured: 'onTextInputCapture',
},
},
},
directEventTypes: {},
validAttributes: {
...ReactNativeViewViewConfig.validAttributes,
maxFontSizeMultiplier: true,
adjustsFontSizeToFit: true,
minimumFontScale: true,
autoFocus: true,
placeholder: true,
inlineImagePadding: true,
contextMenuHidden: true,
textShadowColor: {process: require('../../StyleSheet/processColor')},
maxLength: true,
selectTextOnFocus: true,
textShadowRadius: true,
underlineColorAndroid: {process: require('../../StyleSheet/processColor')},
textDecorationLine: true,
blurOnSubmit: true,
textAlignVertical: true,
fontStyle: true,
textShadowOffset: true,
selectionColor: {process: require('../../StyleSheet/processColor')},
selection: true,
placeholderTextColor: {process: require('../../StyleSheet/processColor')},
importantForAutofill: true,
lineHeight: true,
textTransform: true,
returnKeyType: true,
keyboardType: true,
multiline: true,
color: {process: require('../../StyleSheet/processColor')},
autoCompleteType: true,
autoComplete: true,
numberOfLines: true,
letterSpacing: true,
returnKeyLabel: true,
fontSize: true,
onKeyPress: true,
cursorColor: {process: require('../../StyleSheet/processColor')},
text: true,
showSoftInputOnFocus: true,
textAlign: true,
autoCapitalize: true,
autoCorrect: true,
caretHidden: true,
secureTextEntry: true,
textBreakStrategy: true,
onScroll: true,
onContentSizeChange: true,
disableFullscreenUI: true,
includeFontPadding: true,
fontWeight: true,
fontFamily: true,
allowFontScaling: true,
onSelectionChange: true,
mostRecentEventCount: true,
inlineImageLeft: true,
editable: true,
fontVariant: true,
},
};
module.exports = (AndroidTextInputViewConfig: PartialViewConfig);