Is there a way to update bounds when client bounding of the parent changed?
The bounds dosent't update when client bounding of the parent changed
I'm using react-rnd version [10.3.4]
My browser is: Chrome 93.0.4577.82
I am sure this issue is not a duplicate? Not sure, but it seems that there is no fix yet for this type of issues at this moment.
Reproduced project
https://codesandbox.io/s/epic-sun-59yzv?file=/src/index.js
Description
As mentioned above
Steps to Reproduce
- Click
Changebutton. - You can see that the
Rndblock goes out of the bounds. - Drag the
Rndblock, theRndblock goes into the bounds again as you started dragging.
Expected behavior
The bounds should be updated automatically when client bounding of the parent changed, or providing a instance method to update the bounds from outside of Rnd just like updateSize and updatePosition
Actual behavior
Rnd just goes out of the bounds when client bounding of the parent changed, even though it should not be. Also Rnd has no API or some other way for updating bounds from outside.
As a temporary fix I have directly updated the props being passed to the draggable. The props can be accessed through the draggable ref.
