-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
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
TextInput content scrolls in outlined mode on Android #2730
Comments
Couldn't find version numbers for the following packages in the issue:
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:
Can you verify that the issue still exists after upgrading to the latest versions of these packages? |
Couldn't find version numbers for the following packages in the issue:
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:
Can you verify that the issue still exists after upgrading to the latest versions of these packages? |
Hey @PedroBern, I will check that, however since you set the height on |
Hi @lukewalczak, thanks for replying. I'm currently using dense, but this happens regardless of the height set, it will still "scroll", which makes it impossible to use inside a SrollView, for example. |
@PedroBern Without specifying the height and with |
@lukewalczak, you do need to specify the height to reproduce it, I meant that it doesn't matter what height value you use, the bug still happens. Using the dense prop without height is working for me as well. |
same here, on android. If i specify any height, it happens. Calculated paddingTop/Bottom is probably too big. But if i change it to zero (with render prop), it works as expected in my case (text is already aligned in the center so paddingTop/Bottom is not needed for my single line case). react-native-paper: 4.12.1 |
@sommcz could you please attach the snack presenting the issue? |
https://snack.expo.dev/wV8wWJ9pS Type some text and drag it up and down. |
facing same issue on android any solution for this issue other then dense prop? |
i've used render prop to render TextInput with overriden style (paddingTop/Bottom: 0) => it works. |
Whats the solution for this |
any update on this issue, |
Giving maxHeight and justifyContent: 'center' worked for me |
can you please share the snack? I'm getting like two TextInput one over another, one with default props. |
Current behaviour
When height property is set on an outlined input, it becomes scrollable when focused
Edit: only happens on Android
Expected behaviour
TextInput should not be scrollable
Code sample
`import * as React from 'react';
import {TextInput} from 'react-native-paper';
export default function App() {
return (
<TextInput
style={{marginTop: 24, height: 40}}
mode='outlined'
placeholder='This placeholder will scroll when focused'
/>
);
}`
Screenshots (if applicable)
What have you tried
Your Environment
Snack that reproduces the issue:
https://snack.expo.io/6tTczRnvw
The text was updated successfully, but these errors were encountered: