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

Multiple Picker Groups is overflowing from screen #12

Closed
itsramiel opened this issue Jun 21, 2022 · 4 comments · Fixed by #15
Closed

Multiple Picker Groups is overflowing from screen #12

itsramiel opened this issue Jun 21, 2022 · 4 comments · Fixed by #15
Labels
bug Something isn't working

Comments

@itsramiel
Copy link

I am trying to simulate a datetime picker , but because it is alotting the same space for every group, one of the groups is overflowing.
Is it possible to maybe assign a flex value to each GroupPicker or something similar to shrink, expand?
rsz_1655826009762

@Liamandrew Liamandrew added the bug Something isn't working label Jun 22, 2022
@Liamandrew
Copy link
Owner

There could be a few potential solutions here. Is this only a problem on Android?

@itsramiel
Copy link
Author

itsramiel commented Jun 22, 2022

I am not sure really, couldnt try it on an iphone. I would have to create a new expo client which is a hassle, If it is needed, let me know and I'll do it

@Liamandrew
Copy link
Owner

This is more difficult than I originally thought to solve properly on Android. It might require changing the native library being used which is a bigger piece of work that will need to be investigated.

For now, in v0.4.0 there is a new prop width that can be used to help with your layout a bit:

<Picker>
  <PickerColumn>
    <PickerItem label="Tomorrow (Wednesday)" value="1" />
    <PickerItem label="Tomorrow (Wednesday)" value="2" />
    <PickerItem label="Tomorrow (Wednesday)" value="3" />
    <PickerItem label="Tomorrow (Wednesday)" value="4" />
    <PickerItem label="Tomorrow (Wednesday)" value="5" />
  </PickerColumn>
  <PickerColumn width={60}>
    <PickerItem label="1" value="1" />
    <PickerItem label="2" value="2" />
    <PickerItem label="3" value="3" />
    <PickerItem label="4" value="4" />
    <PickerItem label="5" value="5" />
  </PickerColumn>
  <PickerColumn width={60}>
    <PickerItem label="1" value="1" />
    <PickerItem label="2" value="2" />
    <PickerItem label="3" value="3" />
    <PickerItem label="4" value="4" />
    <PickerItem label="5" value="5" />
  </PickerColumn>
</Picker>

Screenshot_1657950618

@itsramiel
Copy link
Author

Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants