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

Refresh issues on swapping out the data with larger data sets #47

Open
joshbartley opened this issue May 18, 2018 · 1 comment
Open

Comments

@joshbartley
Copy link

While working on using this plugin, I was swapping out content, first I just created a new instance, then switched to using refresh. I noticed an issue that everyone was on one line because the calculation was returning undefined, so the top css attribute wasn't being set.

I found that by removing the check if this._itemPositions already exists, and creating a new array each time, that the issues went away. Checking the examples, they do not have data that increases the size/length of the data after the first load. I wanted to check that this was the correct way to go about this or if I need to create a PR.

https://github.com/tbranyen/hyperlist/blob/master/lib/index.js#L224

@stevenvachon
Copy link
Contributor

I was able to fix this by running the destroy() method before re-instantiating, instead of using the refresh() method.

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

No branches or pull requests

2 participants