Skip to content

Commit 4314d19

Browse files
authored
Align measured iOS component height with layout constraints (#180)
Now measured component height is at most the layout constraints' maximum allowed height for the component. This way we don't get tons of warnings from the shadow node each time measuring in a scrollable component is done.
1 parent aa2d350 commit 4314d19

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

ios/internals/EnrichedTextInputViewShadowNode.mm

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,10 @@
5555
});
5656
}
5757

58-
return {estimatedSize.width, estimatedSize.height};
58+
return {
59+
estimatedSize.width,
60+
MIN(estimatedSize.height, layoutConstraints.maximumSize.height)
61+
};
5962
}
6063
} else {
6164
// on the very first call there is no componentView that we can query for the component height

0 commit comments

Comments
 (0)