Closed
Description
Overview of the problem
I'm using react-rnd version [10.4.1]
react, react-dom version: 18.2.0
My browser is: Chrome Version 115.0.5790.170 (Official Build) (arm64)
Reproduced project
https://codesandbox.io/s/naughty-shape-hz4t3r
Description
I store the position of RnD element in the redux store. But when I pass the stored value back to the component the positioning doesn't work properly(see the codesandbox)
Same happens if you try to store the position to the react state
Steps to Reproduce
- Create a wrapper component for RnD with some width and height
- Put the RnD component inside the wrapper and set
bounds="parent"
property - Create a redux reducer and action
- Dispatch the action on every
onDrag
event with new position - Pass the position from redux store back to the RnD component
Expected behavior
The RnD component follows mouse movement
Actual behavior
The RnD component quickly moves to the bottom right corner and stays there
Metadata
Metadata
Assignees
Labels
No labels