question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Picker goes back a few values when pressing Done

See original GitHub issue

Describe the bug
When I tried ^6.0.0 & went from 5.2.5 I started getting reports that on iPad’s it went back a few values when pressing Done. If they don’t press Done & just dismiss the value stay’s correctly.

To Reproduce
Steps to reproduce the behavior:

  1. Go to to the picker with a few values or so
  2. Click on the picker
  3. Scroll down to value & press Done
  4. You should now see that it isn’t on the value that you want

Expected behavior
When you press done it should stay on the value that you selected.

Screenshots
n/a

Additional details

  • Device: iPad
  • OS: iOS
  • react-native-picker-select version: 6.0.0+
  • react-native version: 0.60.3
  • react version: 16.8.6

Reproduction and/or code sample
It’s honestly really hard to reproduce but it seems to only happen on iPad’s. I know that when I revert to 5.2.5 from ^6.0.0 it started working for pressing the Done button. So right now the only solution for a quick fix is to set "react-native-picker-select": "5.2.5" in package.json.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
lfkwtzcommented, Aug 8, 2019

Weird - nothing obvious I can see causing this has changed since 5.2.5 - but I rarely test this on an iPad so anything is possible. Will try to reproduce when I get a moment.

0reactions
fattomhkcommented, Aug 30, 2019

@awinograd I installed the latest version and the done button cannot be clicked.

<RNPickerSelect
						ref={ref => {
							this.select = ref;
						}}
						disabled={false}
						placeholder={{}}
						useNativeAndroidPickerStyle={false}
						value={this.props.screenProps.locale}
						items={[{ label: '繁體中文', value: 'zh-hk' }, { label: '简体中文', value: 'zh-cn' }]}
						doneText={i18n.t('Buttons.OK')}
						onDonePress={() => {
							console.warn('Checkpoint');
						}}
						onValueChange={value => {
							if (!value || value === this.props.screenProps.locale) return;
							this.props.screenProps.setLocale(value);
							this.updateData(value);
						}}
					/>
Read more comments on GitHub >

github_iconTop Results From Across the Web

datetimepicker jumps back to 1899 on focus, how can I fix it?
it seems that it automatically select a date. I don't want it to automatically select a date. so if the input already has...
Read more >
Issues with Date Picker / Date Formats
Solved: Hello Community, I'm having some problems getting my dates to display / submit correctly using a Datepicker linked to a SharePoint List....
Read more >
Working with Picker in SwiftUI - SerialCoder.dev
Read about the Picker view in SwiftUI. Learn how to present options that users can choose from, how to customize the picker, and...
Read more >
Time picker sometimes resets value to previous value after ...
Bug report Hello! Summary When using the Time mode, the value seems to jump to a previously selected value. I am using the...
Read more >
react-native-community/datetimepicker - npm
React Native date & time picker component for iOS, Android and Windows. Screenshots. Expand for screenshots ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found