mirror of
https://github.com/status-im/react-native.git
synced 2025-02-28 09:00:55 +00:00
Fixed a bug when <Text> does not redraw native view on relayout
Summary: `contentFrame` is now always provided by shadow thread (with attributed string and embedded views), so we have to update it on every single relayout. Reviewed By: yungsters Differential Revision: D6817401 fbshipit-source-id: c2a1f314f34a2187053eb11ce0744c935edbb8ae
This commit is contained in:
parent
2a3c37f424
commit
7d1ec7a3dc
@ -235,6 +235,21 @@
|
||||
return textStorage;
|
||||
}
|
||||
|
||||
- (void)applyLayoutNode:(YGNodeRef)node
|
||||
viewsWithNewFrame:(NSMutableSet<RCTShadowView *> *)viewsWithNewFrame
|
||||
absolutePosition:(CGPoint)absolutePosition
|
||||
{
|
||||
if (YGNodeGetHasNewLayout(self.yogaNode)) {
|
||||
// If the view got new layout, we have to redraw it because `contentFrame`
|
||||
// and sizes of embedded views may change.
|
||||
_needsUpdateView = YES;
|
||||
}
|
||||
|
||||
[super applyLayoutNode:node
|
||||
viewsWithNewFrame:viewsWithNewFrame
|
||||
absolutePosition:absolutePosition];
|
||||
}
|
||||
|
||||
- (void)applyLayoutWithFrame:(CGRect)frame
|
||||
layoutDirection:(UIUserInterfaceLayoutDirection)layoutDirection
|
||||
viewsWithUpdatedLayout:(NSMutableSet<RCTShadowView *> *)viewsWithUpdatedLayout
|
||||
|
Loading…
x
Reference in New Issue
Block a user