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

onDateChange not updating fast enough, reverts to previous state upon not being able to register the scroll-select(iOS) #458

Open
Guide4Ever opened this issue Feb 9, 2022 · 1 comment

Comments

@Guide4Ever
Copy link

Issue

onDateChange function is not updating fast enough. Sometimes when I quickly scroll and select let say 4 numbers (sequentially), the last (in our case 4th value) is not registered thus reverting back to the 3rd. That occurs with each scroll wheel separately. It's not an issue of combined scrolling of i.e. days and months. Individual scroll picker inherits this issue.

The last value upon fast scroll-select does not get updated/ registered by onDateChange function, it locks to the previous state. (short explanation).

Expected Behavior

Should register the last value even if it's being fast scrolled.

Code

      <DatePicker
        scrollRef={scrollRef}
        mode="time"
        date={date}
        locale="en"
        open={pickerOpen}
        onDateChange={changeFunction}
        minuteInterval={15}
      />

Environment

  1. react-native -v: 0.66.1
  2. node -v: v16.13.0
  3. npm -v: 8.1.0
  4. target platform: iOS (could be Android too, haven't tested there yet)
  5. operating system: macOS (emulator Xcode)
@Guide4Ever
Copy link
Author

Guide4Ever commented Feb 9, 2022

Upon checking with Flipper. Function was called 4 out of 4 times, however in the last 2 cases, the data was identical, no change. I noticed this issue using Flipper and console logging onDateChange function. RIP
At this point, it's out of my control to do anything.

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