Closing a Swipeable element when another is opened
See original GitHub issueI’m currently using Swipeable to create a list of items, each of which the user can swipe to delete. It’s working fine but if I swipe a row and open one and then swipe another, the previously-opened row is still swiped open but I’d like it to be closed.
I’ve searched for solutions and made a little progress myself using refs but I’ve not been able to get it working perfectly. I’ve also come across quite a few people asking for the same thing and it seems like pretty standard behaviour. It’d be great if you could add some documentation with examples covering this.
Thank you.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:23
- Comments:41 (2 by maintainers)
Top Results From Across the Web
React Native Swipeable (Swipe to delete) not closing
When I press delete, the contact gets deleted however the swipeable remains open. I want it to close after it gets pressed but...
Read more >Swipeable | React Native Gesture Handler - Software Mansion
onSwipeableOpen . method that is called when action panel gets open (either right or left). Takes swipe direction as an argument. onSwipeableClose ....
Read more >React Native Mobile App Tutorial: Using Swipeable ... - YouTube
React Native Mobile App Tutorial: Using Swipeable Component With FlatList #reactnative #supabase #flatlist #swipeableSo the last video was ...
Read more >React Native Gesture Handler - Swipe To Delete - YouTube
React Native Swipeable | Swipe To Delete | React Native Gesture Handler | Dope Programming · Key moments. View all · Key moments...
Read more >A ListView With rows that Swipe Open and Closed - Morioh
Handles default native behavior such as closing rows when ListView is ... Also includes <SwipeRow> if you want to use a swipeable row...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

@AmanSharma2609 The idea is using
refandclose(). Hope it helpsThis seems to be working for me. Sharing just in case