From 8c3260f2a4b907635e93c215c95a5e7903f432af Mon Sep 17 00:00:00 2001 From: Ruslan Shestopalyuk Date: Fri, 10 May 2024 00:14:33 -0700 Subject: [PATCH] Make relevant TextInput examples not depend on top window size (#44517) Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/44517 # Changelog: [Internal] - A follow-up to https://github.com/facebook/react-native/pull/44505, turns out this is also an issue for TextInput examples, which work of assumption of some of the text input fields being of limited width, but in practice growing to occupy the parent window width, which can be quite large on platforms different from the classic mobile ones. This diff makes the corresponding tests more practical, not expanding to the parent window anymore. Reviewed By: christophpurrer Differential Revision: D57196308 fbshipit-source-id: 7018e8c51adb70fe6a03e50d71eff9ba997fd07a --- .../js/examples/TextInput/TextInputExample.android.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/packages/rn-tester/js/examples/TextInput/TextInputExample.android.js b/packages/rn-tester/js/examples/TextInput/TextInputExample.android.js index 37786b09b1824d..c2c8eb7084a490 100644 --- a/packages/rn-tester/js/examples/TextInput/TextInputExample.android.js +++ b/packages/rn-tester/js/examples/TextInput/TextInputExample.android.js @@ -145,6 +145,9 @@ const styles = StyleSheet.create({ singleLineWithHeightTextInput: { height: 30, }, + wrappedText: { + maxWidth: 300, + }, }); const examples: Array = [ @@ -380,7 +383,7 @@ const examples: Array = [ platform: 'android', render: function (): React.Node { return ( - + = [ title: 'Auto-expanding', render: function (): React.Node { return ( - +