mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-11 19:37:57 +08:00
allow finding the rootTag of any reactTag inside UIManager
Summary: added API to in UIManager to find the rootTag/View of any reactTag based on its layout (shadow views) hierarchy (not to be used by JS) Reviewed By: javache Differential Revision: D3750410 fbshipit-source-id: 68611e39930d53ece478f25245ddc7f7838daaa6
This commit is contained in:
committed by
Facebook Github Bot 9
parent
6729df3f28
commit
35e7a266db
@@ -518,4 +518,17 @@ public class UIManagerModule extends ReactContextBaseJavaModule implements
|
||||
public void addUIBlock (UIBlock block) {
|
||||
mUIImplementation.addUIBlock(block);
|
||||
}
|
||||
|
||||
/**
|
||||
* Given a reactTag from a component, find its root node tag, if possible.
|
||||
* Otherwise, this will return 0. If the reactTag belongs to a root node, this
|
||||
* will return the same reactTag.
|
||||
*
|
||||
* @param reactTag the component tag
|
||||
*
|
||||
* @return the rootTag
|
||||
*/
|
||||
public int resolveRootTagFromReactTag(int reactTag) {
|
||||
return mUIImplementation.resolveRootTagFromReactTag(reactTag);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user