Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix width/height change via prop change #157

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

pionl
Copy link
Contributor

@pionl pionl commented Oct 25, 2017

When sending first size via prop (200x300), and then changing size via
prop (300x200) then the state has old size (200x300) but renderers
200x300 until onResizeStart is started (renders 300x200) until
onMouseMove is triggered.

@pionl pionl force-pushed the fix-state-prop-update branch 3 times, most recently from 94f898b to a422370 Compare October 25, 2017 19:55
When changing size (first 200x300) and then changing it to different
value (300x200) the render is rendering size correctly, but when
starting to drag a corner, the size is changed back to 200x300 until I
move mouse. This is caused by different size in state.
@pionl pionl force-pushed the fix-state-prop-update branch from a422370 to 90ec1d3 Compare October 25, 2017 20:03
@bokuweb
Copy link
Owner

bokuweb commented Oct 27, 2017

@pionl Thanks for your PR. Could you please provide reproduced sample in webpackbin if you get a chanece?
https://www.webpackbin.com/bins/-Ku4nRhImIfnt9N08lGu

@pionl
Copy link
Contributor Author

pionl commented Oct 27, 2017

Sure thing, on this easy test you can see the incorrect size after clicking the button and using resize.

https://www.webpackbin.com/bins/-KxSjcMvj99YfILTTyS3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants