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

Picker size changes according to content when minWidth, width and a custom placeholder is used. #571

Open
Josh2941 opened this issue Apr 13, 2024 · 0 comments

Comments

@Josh2941
Copy link

Josh2941 commented Apr 13, 2024

Picker size changes according to content when minWidth, width and a custom placeholder is used. This happens when I place a Picker next to a TextInput field where both will have 50% width.
Describe the bug

A clear and concise description of what the bug is.

To Reproduce

Steps to reproduce the behavior:

  1. Create a View with flexDirection: 'row'
  2. Place any component on the left side with flex: 1
  3. Place the Picker on the right side and try to give equal space for both the components
  4. Use a custom placeholder.
  5. You can notice the issue. The picker change its width based on the option selected.

Expected behavior

The Picker size should never change no matter how big or small the text content is inside it.

Screenshots

Making the width as 90% is not changing the overall width but the width of the text inside the picker
Screenshot 2024-04-14 at 12 51 37 AM

Additional details

  • Device: iPhone/simulator
  • OS: iOS 17
  • react-native-picker-select version: 9.1.3
  • react-native version: 0.73.6
  • expo sdk version: n/a

Reproduction and/or code sample

Check out this snack where I have reproduced -> https://snack.expo.dev/IJjBAHlomzTQiSS8Pk9Wx
Select iOS simulator in the snack to reproduce the issue.

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

No branches or pull requests

1 participant