Skip to content

Commit 46f68ac

Browse files
HeyImChrisfacebook-github-bot
authored andcommitted
onDismiss to be an RCTDirectEventBlock (#33222)
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](7bf78ea) 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: #33222 Test Plan: We don't redbox downstream anymore Reviewed By: p-sun, RSNara Differential Revision: D34628759 Pulled By: philIip fbshipit-source-id: bb3cc78fa43d20808579c614e25716880d002d88
1 parent 97f3eb2 commit 46f68ac

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

React/Views/RCTModalHostView.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
@property (nonatomic, copy) RCTDirectEventBlock onOrientationChange;
3939

4040
// Fabric only
41-
@property (nonatomic, copy) RCTBubblingEventBlock onDismiss;
41+
@property (nonatomic, copy) RCTDirectEventBlock onDismiss;
4242

4343
- (instancetype)initWithBridge:(RCTBridge *)bridge NS_DESIGNATED_INITIALIZER;
4444

0 commit comments

Comments
 (0)