mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Add a hand-written JS view config for AndroidTextInput
Summary: Hand-writing a JS view config for AndroidTextInputNativeComponent. This diff was generated by adding logging to `getNativeComponentAttributes`. Diff preview: https://our.intern.facebook.com/intern/diff/view-version/96875488/ Changelog: [Internal] Reviewed By: mdvacca Differential Revision: D19456328 fbshipit-source-id: b2d5abd2fde380be182b95881c335d24481343f1
This commit is contained in:
committed by
Facebook Github Bot
parent
6871416328
commit
4dd93582b6
@@ -25,6 +25,8 @@ import type {ColorValue} from '../../StyleSheet/StyleSheetTypes';
|
||||
import requireNativeComponent from '../../ReactNative/requireNativeComponent';
|
||||
import codegenNativeCommands from '../../Utilities/codegenNativeCommands';
|
||||
import * as React from 'react';
|
||||
import AndroidTextInputViewConfig from './AndroidTextInputViewConfig';
|
||||
const ReactNativeViewConfigRegistry = require('../../Renderer/shims/ReactNativeViewConfigRegistry');
|
||||
|
||||
export type KeyboardType =
|
||||
// Cross Platform
|
||||
@@ -563,8 +565,17 @@ export const Commands: NativeCommands = codegenNativeCommands<NativeCommands>({
|
||||
],
|
||||
});
|
||||
|
||||
const AndroidTextInputNativeComponent: HostComponent<NativeProps> = requireNativeComponent<NativeProps>(
|
||||
'AndroidTextInput',
|
||||
);
|
||||
let AndroidTextInputNativeComponent;
|
||||
if (global.RN$Bridgeless) {
|
||||
ReactNativeViewConfigRegistry.register('AndroidTextInput', () => {
|
||||
return AndroidTextInputViewConfig;
|
||||
});
|
||||
AndroidTextInputNativeComponent = 'AndroidTextInput';
|
||||
} else {
|
||||
AndroidTextInputNativeComponent = requireNativeComponent<NativeProps>(
|
||||
'AndroidTextInput',
|
||||
);
|
||||
}
|
||||
|
||||
export default AndroidTextInputNativeComponent;
|
||||
// flowlint-next-line unclear-type:off
|
||||
export default ((AndroidTextInputNativeComponent: any): HostComponent<NativeProps>);
|
||||
|
||||
Reference in New Issue
Block a user