mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Remove code supporting legacy paper interop from Picker view manager
Summary: Picker was migrated to Fabric in stack ending in D23663596 (https://github.com/facebook/react-native/commit/8f45db3b9eba9d4805af8c48fbaa1122cb9601d4). Therefore, Picker's paper view manager is never used in Fabric through LegacyInteropLayer. This diff deletes a codepath that was created to accommodate this interop layer. Changelog: [Internal] Reviewed By: sammy-SC Differential Revision: D27245596 fbshipit-source-id: e574e4aedcfef0ae639cb2aa446e27d6db5e9b94
This commit is contained in:
committed by
Facebook GitHub Bot
parent
05418f8fcc
commit
daaa1b2c05
@@ -48,19 +48,10 @@ RCT_EXPORT_METHOD(setNativeSelectedIndex : (nonnull NSNumber *)viewTag toIndex :
|
||||
{
|
||||
[self.bridge.uiManager addUIBlock:^(RCTUIManager *uiManager, NSDictionary<NSNumber *, UIView *> *viewRegistry) {
|
||||
UIView *view = viewRegistry[viewTag];
|
||||
|
||||
if ([view isKindOfClass:[RCTPicker class]]) {
|
||||
[(RCTPicker *)view setSelectedIndex:index.integerValue];
|
||||
} else {
|
||||
// This component is used in Fabric through LegacyInteropLayer.
|
||||
// `RCTPicker` view is subview of `RCTLegacyViewManagerInteropComponentView`.
|
||||
// `viewTag` passed as parameter to this method is tag of the `RCTLegacyViewManagerInteropComponentView`.
|
||||
UIView *subview = [uiManager viewForReactTag:viewTag].subviews.firstObject;
|
||||
if ([subview isKindOfClass:[RCTPicker class]]) {
|
||||
[(RCTPicker *)subview setSelectedIndex:index.integerValue];
|
||||
} else {
|
||||
RCTLogError(@"view type must be RCTPicker");
|
||||
}
|
||||
RCTLogError(@"View type must be RCTPicker!");
|
||||
}
|
||||
}];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user