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 #1243 #1246

Merged
merged 1 commit into from
Jul 20, 2020
Merged

Fix #1243 #1246

merged 1 commit into from
Jul 20, 2020

Conversation

rhgb
Copy link
Contributor

@rhgb rhgb commented Jul 17, 2020

#1243 This issue is caused by:

  1. cssTransforms props of GridItem is determined by combining two things in ReactGridLayout: the property cssTransforms, and the state mounted.
  2. The mounted state is initially false, causing GridItem using offset and percentage for positioning initially, instead of transform.
  3. The mounted state is set to true in componentDidMount. But because shouldComponentUpdate method doesn't check it, the GridItem rendered won't change, until another update is triggered.

This PR fixes this issue. I've checked that it works in my application.

@STRML
Copy link
Collaborator

STRML commented Jul 20, 2020

Thanks!

@STRML STRML merged commit bf48aca into react-grid-layout:master Jul 20, 2020
@mario-jerkovic
Copy link

Is there any eta for this fix :)

@STRML
Copy link
Collaborator

STRML commented Jul 21, 2020

Yes, it's in 1.0.0.

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.

3 participants