meliorence / meliorence/react-native-snap-carousel
Question: How to set active Item programmatically?
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?
Question
Questions
How can I set the active Item programmatically?
Current Functionality: OnPress Button, the data passed to the carousel which is updated and the selected item in data is removed from the data object. This updated the data by removing that item from the Carousel. However, if you remove the last item (the item at the end of the data object) in the carousel, the carousel item shows blank till it is interacted with (left swipe or right swipe)
Current Functionality GIF: https://gyazo.com/b1c28ec48599e6f147ddd7c913b36081
So, How can I set the active Item programmatically? That will allow me to change the active item to the first item in case of an update.
I appreciate your time for reading this and helping. Thank you 🥇
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
No files, tests, or entry points are identified in the issue. Start by reproducing the carousel behavior after removing the last item, then trace how the updated data and active item are handled; done means the carousel selects the first remaining item instead of showing a blank state.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, react-native
- Domain
- frontend, mobile
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100