We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
A multiline TextInput element expands to adapt to text content on mobile, but it doesn't on web. Instead a scrollbar appears inside the textarea
TextInput
textarea
TextInput expands on web to adapt to text length, like it does on mobile. This is expected under the material guidelines: https://material.io/archive/guidelines/components/text-fields.html#text-fields-field-types
https://snack.expo.dev/@raphaelmerx/textinput
Adapting the height through onContentSizeChange, however the textarea never shrinks in size when deleting text:
onContentSizeChange
const [height, setHeight] = useState(undefined) <TextInput multiline={true} onContentSizeChange={(event) => { setHeight(event.nativeEvent.contentSize.height) }} style={{ height }} />
The text was updated successfully, but these errors were encountered:
Couldn't find version numbers for the following packages in the issue:
react-native-vector-icons
npm
yarn
expo
Can you update the issue to include version numbers for those packages? The version numbers must match the format 1.2.3.
The versions mentioned in the issue for the following packages differ from the latest versions on npm:
react-native
0.64.3
0.67.4
Can you verify that the issue still exists after upgrading to the latest versions of these packages?
Sorry, something went wrong.
I am experiencing this issue with the following versions (adding the missing version numbers from above):
Would love to see this fixed for consistency in my app across web and mobile!
No branches or pull requests
Current behaviour
A multiline
TextInput
element expands to adapt to text content on mobile, but it doesn't on web. Instead a scrollbar appears inside thetextarea
Expected behaviour
TextInput
expands on web to adapt to text length, like it does on mobile. This is expected under the material guidelines: https://material.io/archive/guidelines/components/text-fields.html#text-fields-field-typesCode sample
https://snack.expo.dev/@raphaelmerx/textinput
Screenshots (if applicable)
What have you tried
Adapting the height through
onContentSizeChange
, however the textarea never shrinks in size when deleting text:Your Environment
The text was updated successfully, but these errors were encountered: