question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How can I close the Swipeable instantly?

See original GitHub issue

I am reading <Swipeable /> component and I am trying to find a way to disable the .close() animation.

The use case is a swipe right to add to favorite, after 3000ms, the line is in favorite, we just close it and make a star appear within item.

How can I close the Swipeable instantly?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5

github_iconTop GitHub Comments

1reaction
bucherelicommented, Apr 11, 2020

Patch Swipeable.js with

  closeInstantly = () => {
    const { dragX, rowTranslation } = this.state;
    dragX.setValue(0);
    rowTranslation.setValue(0);
    this.setState({ rowState: Math.sign(0) });
  }
0reactions
kopaxcommented, Apr 16, 2020

Well noted and thanks. Did you had a chance to have a look at #1032? By any chance… Thank you.

Read more comments on GitHub >

github_iconTop Results From Across the Web

React Native Swipeable (Swipe to delete) not closing
I'm using Swipeable from React-Native-Gesture-Handler to incorporate swipe to delete on my page. When I press delete, the contact gets ...
Read more >
React Native Gesture Handler - Swipe To Delete - YouTube
reactnative #dopeprogrammingIn this tutorial you'll learn how you can implement swipe to delete or swipe to do any other task in react ...
Read more >
How To Close Apps On iPhone 14/iPhone 14 Pro! - YouTube
Get The Cheapest iPhones Here: https://amzn.to/3JTnWAr Get The Cheapest Androids Here: https://amzn.to/3r2k1st Get Wallpapers I Use In My ...
Read more >
Close an app on your iPhone or iPod touch - Apple Support (CA)
From the Home Screen, swipe up from the bottom of the screen and pause in the middle of the screen. Swipe right or...
Read more >
Swipeable | React Native Gesture Handler - Software Mansion
This component allows for implementing swipeable rows or similar interaction. ... to the open state (or the open panel will animate into the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found