You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've had a look into this and it's related to onMouseDown taking priority over onClick, blocking it from calling.
A workaround is to use use the onResizeStop prop like this:
onResizeStop={(e, direction, ref, d) => {
if (d.width === 0 && d.height === 0) {
// This means user just clicked and didnt drag, treat it as a click.
yourOnClickLogicHere()
} else {
setWidth(width + d.width);
}
}}
d.width and d.height is how far the mouse was dragged. If these are zero you can treat it like a click.
In my example I'm only resizing the width, but you can handle d.height in the same way.
onResizeStop doesn't work for me in my use case what I did is implemented onMouseDown in handleComponent and used event.stopPropagation as per my need.
I, like many other people, feel the need to use the click event for additional functionality.
Similar problem: #753
The text was updated successfully, but these errors were encountered: