Add auto-expanding multiline TextInput example to RNTester (#59416)

Summary:

Add a new RNTester example in TextInputSharedExamples to reproduce iOS and Android issues with auto-expanding multiline text fields. There is already an existing example, but an empty, uncontrolled variant is needed to reproduce certain issues. An existing iOS-only auto-expanding example is removed as well since it duplicates functionality.

Changelog: [Internal]

Reviewed By: vzaidman

Differential Revision: D127048669

Pull Request resolved: https://github.com/react/react-native/pull/59416
This commit is contained in:
Jason Zheng authored and GitHub committed 2026-11-03 20:59:21 +00:00
1 parent 771f8c7d91
commit 44c8cafa8f
2 files changed
+14 -17

No files matched your search

@@ -778,23 +778,6 @@ const textInputExamples: Array<RNTesterModuleExample> = [
);
},
},
{
title: 'Auto-expanding',
render: function (): React.Node {
return (
<View>
<ExampleTextInput
placeholder="height increases with content"
defaultValue="React Native enables you to build world-class application experiences on native platforms using a consistent developer experience based on JavaScript and React. The focus of React Native is on developer efficiency across all the platforms you care about - learn once, write anywhere. Facebook uses React Native in multiple production apps and will continue investing in React Native."
multiline={true}
enablesReturnKeyAutomatically={true}
returnKeyType="go"
style={[styles.multiline, styles.multilineExpandable]}
/>
</View>
);
},
},
{
title: 'TextInput maxLength',
render: function (): React.Node {
@@ -1192,6 +1192,20 @@ module.exports = [
);
},
},
{
title: 'Auto-expanding (uncontrolled)',
render: function (): React.Node {
return (
<View>
<ExampleTextInput
placeholder="height should grow up to 10 lines"
multiline={true}
numberOfLines={10}
/>
</View>
);
},
},
{
title: 'Drag and drop',
render: function (): React.Node {