I have a react-big-calendar and a button create, which when I click on it, I have a blueprint dialog will be open, I want this will be draggable anywhere.
My code is :
https://codesandbox.io/s/sharp-shockley-tt9bc
How to make it draggable ?
I have a react-big-calendar and a button create, which when I click on it, I have a blueprint dialog will be open, I want this will be draggable anywhere.
My code is :
https://codesandbox.io/s/sharp-shockley-tt9bc
How to make it draggable ?
What you have to do is: 1. Make the div of Dialog draggable as 2. Apply onDrag event on the same div, and pass a function, and the function would do something like:
handleDragEvent = (event) => {
this.setState({
positionX: event.clientX,
positionY: event.clientY,
})
}
And then you need to give these cooridnates to your dialogues as a starting position. You may need some polishing on the above stated function as per your need.