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 values inconsistent when scrolling and clicking ok before the picker lands on an item. #146

Closed
leedriscoll opened this issue Apr 11, 2018 · 3 comments

Comments

@leedriscoll
Copy link

Version
2.1.8

Environment
iOS11 and Android

Steps to reproduce

  • Create a long picker list (with 5 or more items)
  • Open the picker and scroll from top to bottom and click OK before the picker stops animating / lands on an item - see gif.
  • Please not it does happen every single time, it only happens when you do this really quickly.

What is expected?

Either the last item is selected or the first item is selected.
I'd expect the onOK event to pass through the value of the first picker item (because scrolling to the last didn't finish) but I'd expect onChange event to have the value of the last picker item.

What is actually happening?

The last item is selected on the picker popup but the first (or current value) is select on the top level picker.

Both the onChange and onOk event passes the value of the first picker item - however the picker view shows the last picker item as selected

ezgif-4-e45b9d4880

@warmhug
Copy link
Contributor

warmhug commented May 24, 2018

Ref #2008 #1447
This is a complicated issue.

@warmhug
Copy link
Contributor

warmhug commented May 29, 2018

@warmhug warmhug closed this as completed May 29, 2018
@BANG88 BANG88 transferred this issue from ant-design/ant-design-mobile Dec 3, 2018
@BANG88 BANG88 reopened this Dec 3, 2018
@BANG88 BANG88 added this to the Community milestone Dec 13, 2018
@BANG88
Copy link
Member

BANG88 commented Dec 13, 2018

@leedriscoll Could test this on the latest beta version via yarn add @ant-design/react-native@next
if still have the problem please reopen this issue. 😄

@BANG88 BANG88 closed this as completed Dec 13, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants