mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Fix removal for nested legacy interop layer
Summary: Changelog: [Internal] In https://fburl.com/diffusion/3705cj0i we assert that view which is about to be recycled, has no superview. This is a problem in Legacy interop layer which is nested within another interop layer. This originally wasn't considered. Removing views in `finalizeUpdates` like it has been done until now is not enough because when a component is deleted, `finaliseUpdates` isn't called. Reviewed By: shergin Differential Revision: D23572999 fbshipit-source-id: f007dfe293b7d27d56253656c02529163304f83c
This commit is contained in:
committed by
Facebook GitHub Bot
parent
4b95bb2f84
commit
67af6e54fc
+5
-1
@@ -99,7 +99,11 @@ static NSString *const kRCTLegacyInteropChildIndexKey = @"index";
|
||||
|
||||
- (void)unmountChildComponentView:(UIView<RCTComponentViewProtocol> *)childComponentView index:(NSInteger)index
|
||||
{
|
||||
[_viewsToBeUnmounted addObject:childComponentView];
|
||||
if (_adapter) {
|
||||
[_adapter.paperView removeReactSubview:childComponentView];
|
||||
} else {
|
||||
[_viewsToBeUnmounted addObject:childComponentView];
|
||||
}
|
||||
}
|
||||
|
||||
+ (ComponentDescriptorProvider)componentDescriptorProvider
|
||||
|
||||
Reference in New Issue
Block a user