Comments (3)
Hi zuus-keith,
Thank you!
Is it possible to disable a swipe direction?
I can't imagine it. Users can change a swipe direction after they start interaction. For example, it can be to cancel.
Or better yet a prop that you can provide to say which swipe direction will trigger the delete?
Would you like to get this prop in an "onDelete" callback?
Also, here are "onRight/onLeft" calbacks.
Can they help you?
from react-swipe-to-delete-component.
I can't imagine it. Users can change a swipe direction after they start interaction. For example, it can be to cancel.
Can't we determine which direction direction the mouse is moving? For example we want to disable swiping right, if the mousemove event is moving right ignore any further events until other mousedown is called.
Would you like to get this prop in an "onDelete" callback?
This doesn't help because once the user's interaction moves towards a particular direction that will trigger either onRight/onLeft, the callback is called immediately which isn't the behaviour I want; I still want it to obey the value we set in deleteSwipe.
from react-swipe-to-delete-component.
Can't we determine which direction direction the mouse is moving?
Yes, we can, but we can only don't move a component to the left or to the right. A cursor of mouse're moving in any case. I guess it can confuse users.
If users'll swipe more than a value of "deleteSwipe" and then they'll decide to cancel to remove an item they won't be able to do it, because they won't be able to move to opposite direction. I guess it can be dangerously.
from react-swipe-to-delete-component.
Related Issues (14)
- Big big icons only HOT 5
- Feature: Animate Deletion HOT 1
- undefined evaluating navigator.userAgent.match
- Not working on mobile HOT 4
- Babel error
- Touch screen HOT 5
- Not working with NextJS. HOT 4
- Extra events - onLeft and onRight HOT 2
- Bump `node` version HOT 1
- Should ignore vertical swipe HOT 2
- Action Functions
- Pass key upon delete HOT 3
- Paused on promise rejection HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-swipe-to-delete-component.