meliorence / meliorence/react-native-snap-carousel
snapToItem when enableSnap= false
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 10.5k
- Forks
- 2.3k
- PR merge metrics
- No merged PRs in 30d
Description
Hi all question for you :)
Is there a way in this lib to change the currentItem when enableSnap=false ?
Because if i scroll to my list near the tenth for exemple, and then i apply a filter (ie : rest 5 items) i can see only a blank view.. but when i scroll towards the fifth rest items, they appear... (tried triggerRenderingHack(tried different values x) but the behavior is weird like only works to the third consecutive call.. )
When i use enableSnap=true and call myCarouRef.snapToItem(0) after filtering, it works and it brings me at the beginnig so items appear directly but i have to say that snap behavior is not a good experience in my opinion mostly if the user wants to scroll quick.
Any idea ?
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
Begin with the React Native carousel behavior around enableSnap=false, currentItem, snapToItem(0), and triggerRenderingHack after filtering. Reproduce the blank view when a list is shortened, then define done as the remaining items rendering immediately without requiring scrolling or enabling snap; no file or test is named in the issue.
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
- Needs clarification
- Newbie friendliness
- 25/100