[react_native] JS files from D1994196: [react_native] TextInput fix android viewconfig mixins: [NativeMethodsMixin, TimerMixin],
This commit is contained in:
parent
915151c5d7
commit
af895bab53
|
@ -72,7 +72,7 @@ var notMultiline = {
|
|||
onSubmitEditing: true,
|
||||
};
|
||||
|
||||
var TextInputAndroidAttributes = {
|
||||
var AndroidTextInputAttributes = {
|
||||
autoCapitalize: true,
|
||||
autoCorrect: true,
|
||||
autoFocus: true,
|
||||
|
@ -84,10 +84,15 @@ var TextInputAndroidAttributes = {
|
|||
testID: true,
|
||||
};
|
||||
|
||||
var AndroidTextInput = createReactIOSNativeComponentClass({
|
||||
validAttributes: TextInputAndroidAttributes,
|
||||
var viewConfigIOS = {
|
||||
uiViewClassName: 'RCTTextField',
|
||||
validAttributes: RCTTextFieldAttributes,
|
||||
};
|
||||
|
||||
var viewConfigAndroid = {
|
||||
uiViewClassName: 'AndroidTextInput',
|
||||
});
|
||||
validAttributes: AndroidTextInputAttributes,
|
||||
};
|
||||
|
||||
var crossPlatformKeyboardTypeMap = {
|
||||
'numeric': 'decimal-pad',
|
||||
|
@ -293,10 +298,8 @@ var TextInput = React.createClass({
|
|||
*/
|
||||
mixins: [NativeMethodsMixin, TimerMixin],
|
||||
|
||||
viewConfig: {
|
||||
uiViewClassName: 'RCTTextField',
|
||||
validAttributes: RCTTextFieldAttributes,
|
||||
},
|
||||
viewConfig: ((Platform.OS === 'ios' ? viewConfigIOS :
|
||||
(Platform.OS === 'android' ? viewConfigAndroid : {})) : Object),
|
||||
|
||||
isFocused: function(): boolean {
|
||||
return TextInputState.currentlyFocusedField() ===
|
||||
|
@ -591,4 +594,9 @@ var RCTTextField = createReactIOSNativeComponentClass({
|
|||
uiViewClassName: 'RCTTextField',
|
||||
});
|
||||
|
||||
var AndroidTextInput = createReactIOSNativeComponentClass({
|
||||
validAttributes: AndroidTextInputAttributes,
|
||||
uiViewClassName: 'AndroidTextInput',
|
||||
});
|
||||
|
||||
module.exports = TextInput;
|
||||
|
|
Loading…
Reference in New Issue