From fb61eaf6ad09a2fd4f2effd32d05331debe2c7fd Mon Sep 17 00:00:00 2001 From: Mobin Akhter Date: Fri, 20 Dec 2024 10:29:39 -0500 Subject: [PATCH] Fix single-line TextInput height by removing vertical padding and setting multiline={false}, numberOfLines={1} --- .../TextInput/TextInputExample.android.js | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/packages/rn-tester/js/examples/TextInput/TextInputExample.android.js b/packages/rn-tester/js/examples/TextInput/TextInputExample.android.js index c2c8eb7084a490..df7c190da06b66 100644 --- a/packages/rn-tester/js/examples/TextInput/TextInputExample.android.js +++ b/packages/rn-tester/js/examples/TextInput/TextInputExample.android.js @@ -522,6 +522,36 @@ const examples: Array = [ return ; }, }, + { + title: 'Single-line TextInputs - New Arch Bug Reproduction', + description: + 'A single-line TextInput that unexpectedly grows unless numberOfLines={1} is specified.', + render: function (): React.Node { + return ( + + + Single-line TextInput (expected single line, grows incorrectly): + + + + + Observe if the height increases as you type more characters + + + ); + }, + }, ]; module.exports = ({