meliorence / meliorence/react-native-snap-carousel
Fast scrolling in validation don't have option to prevent scroll to next index.
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 10.5k
- Forks
- 2.3k
- PR merge metrics
- No merged PRs in 30d
Description
Is this a bug report, a feature request, or a question?
(bug report)
Have you followed the required steps before opening a bug report?
(Check the step you've followed - put an x character between the square brackets ([]).)
- I have read the guidelines regarding bug report.
- I have reviewed the documentation in its entirety, including the dedicated documentations 📚.
- I have searched for existing issues and made sure that the problem hasn't already been reported.
- I am using the latest plugin version.
- I am following the issue template closely in order to produce a useful bug report.
Have you made sure that it wasn't a React Native bug?
(not a react-native bug.)
Is the bug specific to iOS or Android? Or can it be reproduced on both platforms?
(I don't know about android. I am checking on ios)
Is the bug reproductible in a production environment (not a debug one)?
(both production and debug)
Environment
Environment:
React: 16.8.6
React native: 0.60.5
react-native-snap-carousel: 3.8.4
Target Platform:
iOS (12.4)
Expected Behavior
there is not way to prevent scroll programatically ie. for validation.
Actual Behavior
there is prop scrollEnabled is there. but it's not working not validation if it's have some long process function and if we scroll fast.
ie.
scrollEnabled={this.state.scrollEnabled}
onScroll={this.onScrollPageesss}
onScrollPageesss() {
...
... long validation function
...
return result
this.setState({scrollEnabled: result})
}
Reproducible Demo
https://snack.expo.io/S1XZbsHfU
Steps to Reproduce
(Write your steps so that anyone can reproduce the issue in the Snack demo you provided.)
- write long validation function onScroll for prevent scroll
- just scroll fast, its scroll the next render item without executing current condition
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked Expo Snack and reproduce the issue using the onScroll handler, scrollEnabled prop, and a deliberately long validation function. Trace how fast swipes are processed while validation is pending. Done means a fast swipe cannot advance to the next item when validation disables scrolling, while ordinary scrolling still works.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, react-native
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100