MM-54499 Patch react-native-navigation to fix button text wrapping (#7557)
* MM-54499 Downgrade react-native-navigation to fix button text wrapping * Revert "MM-54499 Downgrade react-native-navigation to fix button text wrapping" This reverts commit b8f65cda426bb02d26fd85d8b8436597b2ae1722. * MM-54499 Patch react-native-navigation to fix button text wrapping
This commit is contained in:
parent
3644a39924
commit
b562e67d02
1 changed files with 37 additions and 2 deletions
|
|
@ -186,7 +186,7 @@ diff --git a/node_modules/react-native-navigation/lib/ios/RNNComponentViewContro
|
|||
index fc482a6..9406bbf 100644
|
||||
--- a/node_modules/react-native-navigation/lib/ios/RNNComponentViewController.m
|
||||
+++ b/node_modules/react-native-navigation/lib/ios/RNNComponentViewController.m
|
||||
@@ -94,6 +94,7 @@
|
||||
@@ -94,6 +94,7 @@ - (void)renderReactViewIfNeeded {
|
||||
}];
|
||||
}];
|
||||
self.reactView.backgroundColor = UIColor.clearColor;
|
||||
|
|
@ -207,7 +207,7 @@ index b44f24f..bf4e1c3 100644
|
|||
|
||||
@implementation RNNOverlayWindow
|
||||
|
||||
@@ -9,6 +11,8 @@
|
||||
@@ -9,6 +11,8 @@ - (UIView *)hitTest:(CGPoint)point withEvent:(UIEvent *)event {
|
||||
|
||||
if ([hitTestResult isKindOfClass:[UIWindow class]] ||
|
||||
[hitTestResult.subviews.firstObject isKindOfClass:RNNReactView.class] ||
|
||||
|
|
@ -216,6 +216,41 @@ index b44f24f..bf4e1c3 100644
|
|||
[hitTestResult isKindOfClass:[RCTModalHostView class]] ||
|
||||
[hitTestResult isKindOfClass:NSClassFromString(@"RCTRootComponentView")]) {
|
||||
return nil;
|
||||
diff --git a/node_modules/react-native-navigation/lib/ios/RNNUIBarButtonItem.m b/node_modules/react-native-navigation/lib/ios/RNNUIBarButtonItem.m
|
||||
index ece1da1..26730ae 100644
|
||||
--- a/node_modules/react-native-navigation/lib/ios/RNNUIBarButtonItem.m
|
||||
+++ b/node_modules/react-native-navigation/lib/ios/RNNUIBarButtonItem.m
|
||||
@@ -87,9 +87,28 @@ - (instancetype)initWithCustomView:(RNNReactView *)reactView
|
||||
buttonOptions:(RNNButtonOptions *)buttonOptions
|
||||
onPress:(RNNButtonPressCallback)onPress {
|
||||
self = [super initWithCustomView:reactView];
|
||||
- [reactView setFrame:CGRectMake(0, 0, 50, 50)];
|
||||
[self applyOptions:buttonOptions];
|
||||
-
|
||||
+ reactView.sizeFlexibility = RCTRootViewSizeFlexibilityWidthAndHeight;
|
||||
+ reactView.hidden = CGRectEqualToRect(reactView.frame, CGRectZero);
|
||||
+
|
||||
+ [NSLayoutConstraint deactivateConstraints:reactView.constraints];
|
||||
+ self.widthConstraint =
|
||||
+ [NSLayoutConstraint constraintWithItem:reactView
|
||||
+ attribute:NSLayoutAttributeWidth
|
||||
+ relatedBy:NSLayoutRelationEqual
|
||||
+ toItem:nil
|
||||
+ attribute:NSLayoutAttributeNotAnAttribute
|
||||
+ multiplier:1.0
|
||||
+ constant:reactView.intrinsicContentSize.width];
|
||||
+ self.heightConstraint =
|
||||
+ [NSLayoutConstraint constraintWithItem:reactView
|
||||
+ attribute:NSLayoutAttributeHeight
|
||||
+ relatedBy:NSLayoutRelationEqual
|
||||
+ toItem:nil
|
||||
+ attribute:NSLayoutAttributeNotAnAttribute
|
||||
+ multiplier:1.0
|
||||
+ constant:reactView.intrinsicContentSize.height];
|
||||
+ [NSLayoutConstraint activateConstraints:@[ self.widthConstraint, self.heightConstraint ]];
|
||||
reactView.delegate = self;
|
||||
|
||||
reactView.backgroundColor = [UIColor clearColor];
|
||||
diff --git a/node_modules/react-native-navigation/lib/src/interfaces/Options.ts b/node_modules/react-native-navigation/lib/src/interfaces/Options.ts
|
||||
index 4851b40..e891183 100644
|
||||
--- a/node_modules/react-native-navigation/lib/src/interfaces/Options.ts
|
||||
|
|
|
|||
Loading…
Reference in a new issue