mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
46f68aceb2
Summary: We're seeing a red box that `Component 'RCTModalHostView' re-registered bubbling event 'topDismiss' as a direct event moduleConstantsForComponent` in some downstream react-native-macOS builds. Looking at other usage of this object, we treat it as a direct event block everywhere else, just this one spot it's a bubbling event block. It was added with [this PR](https://github.com/facebook/react-native/commit/7bf78eae5e2d53438bc333d3b9995b218f74c84b) which doesn't explicitly address the desire for the prop to bubble up through the view hierarchy or not, so I'm guessing it was just mislabeled and should be direct like the other usages. ## Changelog [iOS] [Bug] - Fix modal redbox for onDismiss Pull Request resolved: https://github.com/facebook/react-native/pull/33222 Test Plan: We don't redbox downstream anymore Reviewed By: p-sun, RSNara Differential Revision: D34628759 Pulled By: philIip fbshipit-source-id: bb3cc78fa43d20808579c614e25716880d002d88
57 lines
1.8 KiB
Objective-C
57 lines
1.8 KiB
Objective-C
/*
|
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
*
|
|
* This source code is licensed under the MIT license found in the
|
|
* LICENSE file in the root directory of this source tree.
|
|
*/
|
|
|
|
#import <UIKit/UIKit.h>
|
|
|
|
#import <React/RCTInvalidating.h>
|
|
#import <React/RCTModalHostViewManager.h>
|
|
#import <React/RCTView.h>
|
|
|
|
@class RCTBridge;
|
|
@class RCTModalHostViewController;
|
|
|
|
@protocol RCTModalHostViewInteractor;
|
|
|
|
@interface RCTModalHostView : UIView <RCTInvalidating, UIAdaptivePresentationControllerDelegate>
|
|
|
|
@property (nonatomic, copy) NSString *animationType;
|
|
@property (nonatomic, assign) UIModalPresentationStyle presentationStyle;
|
|
@property (nonatomic, assign, getter=isTransparent) BOOL transparent;
|
|
|
|
@property (nonatomic, copy) RCTDirectEventBlock onShow;
|
|
@property (nonatomic, assign) BOOL visible;
|
|
|
|
// Android only
|
|
@property (nonatomic, assign) BOOL statusBarTranslucent;
|
|
@property (nonatomic, assign) BOOL hardwareAccelerated;
|
|
@property (nonatomic, assign) BOOL animated;
|
|
|
|
@property (nonatomic, copy) NSNumber *identifier;
|
|
|
|
@property (nonatomic, weak) id<RCTModalHostViewInteractor> delegate;
|
|
|
|
@property (nonatomic, copy) NSArray<NSString *> *supportedOrientations;
|
|
@property (nonatomic, copy) RCTDirectEventBlock onOrientationChange;
|
|
|
|
// Fabric only
|
|
@property (nonatomic, copy) RCTDirectEventBlock onDismiss;
|
|
|
|
- (instancetype)initWithBridge:(RCTBridge *)bridge NS_DESIGNATED_INITIALIZER;
|
|
|
|
@end
|
|
|
|
@protocol RCTModalHostViewInteractor <NSObject>
|
|
|
|
- (void)presentModalHostView:(RCTModalHostView *)modalHostView
|
|
withViewController:(RCTModalHostViewController *)viewController
|
|
animated:(BOOL)animated;
|
|
- (void)dismissModalHostView:(RCTModalHostView *)modalHostView
|
|
withViewController:(RCTModalHostViewController *)viewController
|
|
animated:(BOOL)animated;
|
|
|
|
@end
|