I'm trying to limit the dragging in x-axis,
I got this idea,
const getItemStyle = (isDragging, { transform, ...draggableStyle }) => {
const styles = {
boxShadow: isDragging ? '0 0 10px rgba(0, 0, 0, 0.11111)' : 'none',
...draggableStyle,
};
if (!transform) {
return styles;
}
return ({
...styles,
transform: `translate(0, ${transform.substring(transform.indexOf(',') + 1, transform.indexOf(')'))})`,
});
};
But it has lots of performance issues, Does Anybody has idea?
Do you have a feature to do this, like a props or something?
Thanks for this great library.
Application 5: no drag axis locking
For now, the library does not support drag axis locking (aka drag rails). This is where the user is restricted to only dragging along one axis. The current thinking is this breaks the physical metaphor we are going for and sends a message to the user that they are interacting with a piece of software rather than moving physical objects around. It is possible to ensure that a user can only drop in a single list by using props type and isDropDisabled. You can also do some visual treatment to the list onDragStart to show the user that this is the only place they can interact with.
You are welcome to add this on top of the library as you are. However, there might be some rough edges.
I will close this as won't fix. However, other people are welcome to chat about this one 馃憤
Yes i want to know react dnd support dragging only in x-axis.
As my whole application is breaking while dragging through.
i am too need for support this
you can do something like above example, it's working correctly for me, however I think it has performance issue on long lists. @Haqverdi
you can do something like above example, it's working correctly for me, however I think it has performance issue on long lists. @Haqverdi
thanks, i will try
@alirezavalizade Any ideas on what might resolve (or at least reduce) the performance issues?
@alexreardon Way to force your thinking onto everyone and really limit the usability of this library
Most helpful comment
@alexreardon Way to force your thinking onto everyone and really limit the usability of this library