Merge pull request #31466 from viventus/master

[react-native] Add nativeID on ViewProps
This commit is contained in:
Eloy Durán
2018-12-19 14:38:25 +01:00
committed by GitHub
2 changed files with 19 additions and 0 deletions
+10
View File
@@ -912,6 +912,11 @@ export interface TextProps extends TextPropsIOS, TextPropsAndroid, Accessibility
* Used to locate this view in end-to-end tests.
*/
testID?: string;
/**
* Used to reference react managed views from native code.
*/
nativeID?: string;
}
/**
@@ -2031,6 +2036,11 @@ export interface ViewProps
* Used to locate this view in end-to-end tests.
*/
testID?: string;
/**
* Used to reference react managed views from native code.
*/
nativeID?: string;
}
/**
+9
View File
@@ -832,3 +832,12 @@ const SwitchColorTest = () => (
const SwitchThumbColorTest = () => (
<Switch thumbColor={'red'} />
)
const NativeIDTest = () => (
<ScrollView nativeID={'nativeID'}>
<View nativeID={'nativeID'} />
<Text nativeID={'nativeID'} >
Text
</Text>
</ScrollView>
)