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

Add option to reloadOnUpdate #7

Merged
merged 3 commits into from
Sep 9, 2017
Merged

Conversation

elliotdavies
Copy link
Contributor

I've come across an issue where updating the children of the <Flickity> component can cause it to render incorrectly. This is because React rebuilds the child DOM, which wipes out the left: 33% (etc) styling Flickity has applied.

The issue can be fixed by calling reloadCells(). This PR adds a prop called reloadOnUpdate, which if true will call reloadCells() whenever the component updates. It's a quick fix that's sufficient for my use case but could probably be refined further.

Apologies for the formatting noise in the PR; I use Prettier and it had a field day.

@theolampert
Copy link
Collaborator

@elliotdavies Thanks for this!. LGTM, when I have a chance to test properly I'll merge.

@theolampert theolampert merged commit e74401d into yaodingyd:master Sep 9, 2017
@elliotdavies
Copy link
Contributor Author

Thanks @theolampert!

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.

None yet

2 participants