Skip to content

Commit

Permalink
Reset View tag when recycling
Browse files Browse the repository at this point in the history
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
  • Loading branch information
javache authored and facebook-github-bot committed Oct 5, 2022
1 parent 530dae8 commit bed977b
Showing 1 changed file with 1 addition and 0 deletions.
Expand Up @@ -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);
Expand Down

0 comments on commit bed977b

Please sign in to comment.