Skip to content
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 outlined strange inside a view #3811

Closed
Angelk90 opened this issue Apr 10, 2023 · 9 comments · Fixed by #3941
Closed

TextInput outlined strange inside a view #3811

Angelk90 opened this issue Apr 10, 2023 · 9 comments · Fixed by #3941
Assignees

Comments

@Angelk90
Copy link

Current behaviour

As you see from start to weird behavior you don't see placeholder text.
Which instead of in the same input field as above but not found in the view, is seen correctly.

Expected behaviour

Same behavior as the input field above.

How to reproduce?

You can also try it with android expo emulator:
https://snack.expo.dev/exQQvm0ve

Preview

Registrazione.schermo.2023-04-10.alle.11.54.24.mov

Your Environment

software version
android 10
react-native 0.71.4
react-native-paper 5.6.0
node 16.14.2
npm 9.6.2
@lukewalczak
Copy link
Member

Hey @Angelk90, I would suggest to pass style={{flexGrow: 1}} to the lower TextInput so that it takes up all available space next to the button.

@Angelk90
Copy link
Author

Angelk90 commented Apr 10, 2023

@lukewalczak : It seems to work, but you have to understand why the component breaks.
Solution: https://snack.expo.dev/ZG04jk_DM

@lukewalczak
Copy link
Member

It seems to work, but you have to understand why the component breaks.

Could you please explain what is the issue on the attached snack?

@Angelk90
Copy link
Author

@lukewalczak : I posted the solution you proposed :)

@lukewalczak
Copy link
Member

Sorry, but I feel confused atm, has your problem been solved or do you need more help with that issue?

@Angelk90
Copy link
Author

@lukewalczak : We can say that it was fixed using a trick, but the problem persists.

The input field had to be small, I could fix this using marginLeft on the button, but the problem remains.
Increasing the size of the margin to for example 150 the problem reoccurs.

Problem link with marginLeft recurring: https://snack.expo.dev/ECKkiucco

It would be useful to investigate why this behavior occurs.

So for the moment I would not close the question.

@lukewalczak
Copy link
Member

I see, I will check what's the problem with the placeholder

@Angelk90
Copy link
Author

@lukewalczak : I did a test trying it right on the app, the problem persists I don't know why it works on snack expo, but the problem by creating an app and installing it doesn't work.

@lukewalczak lukewalczak self-assigned this Apr 11, 2023
@Angelk90
Copy link
Author

@lukewalczak : I've created an example project in case you want to investigate further.

Link: nptest

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants