mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Reset View tag when recycling
Summary: Automation tests were hitting issues with view recycling enabled because we use the main tag field to lookup views, and not properly resetting it when recycling. Changelog: [Internal] Reviewed By: jehartzog Differential Revision: D40076594 fbshipit-source-id: 5f518b979a23562f7e7fc8271488678e78f50e91
This commit is contained in:
committed by
Facebook GitHub Bot
parent
530dae8a45
commit
bed977b178
@@ -67,6 +67,7 @@ public abstract class BaseViewManager<T extends View, C extends LayoutShadowNode
|
||||
@Override
|
||||
protected T prepareToRecycleView(@NonNull ThemedReactContext reactContext, T view) {
|
||||
// Reset tags
|
||||
view.setTag(null);
|
||||
view.setTag(R.id.pointer_enter, null);
|
||||
view.setTag(R.id.pointer_leave, null);
|
||||
view.setTag(R.id.pointer_move, null);
|
||||
|
||||
Reference in New Issue
Block a user