Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Scrolling above the first option causes the picker to have blank label and value "null" #657

Open
oljubuncic1 opened this issue Feb 10, 2025 · 0 comments

Comments

@oljubuncic1
Copy link

Describe the bug

On IOS, when the picker is scrolled to the beginning, you are able to scroll "above" the first option which sets the value to "null" as a string and shows empty label.

To Reproduce

Steps to reproduce the behavior:

  1. Run the app
  2. Click on RNPickerSelect Component
  3. Scroll to the top and scroll as far above as you can
  4. The value gets set to "null" and the label is blank

Expected behavior

First option should be selected.

Screenshots

n/a

Additional details

  • Device: iPhone13
  • OS: iOS 18
  • react-native-picker-select version: 9.3.1 - it started happening from 9.0.0, on version 8 it works fine
  • react-native version: 0.76.6
  • expo sdk version: 52.0.27

Reproduction and/or code sample

<RNPickerSelect
        items={items}
        onValueChange={field.onChange}
        value={field.value}
        placeholder={required ? {} : { label: 'All', value: null }}
        useNativeAndroidPickerStyle={false}
        doneText="Choose"
        style={{ inputIOSContainer: { pointerEvents: 'none' } }}
      >
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant