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

Support infinite scroll #103

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

Conversation

allenz-crypto
Copy link

During infinite scroll, you trigger a loadMore event when you scroll to the bottom which will add more items into your scroll content. However, the scrollbar remains the same size until you trigger another scroll event.

The resizeScrollbar function (used by recalculate and compute) currently recreates a new scrollbar and resets it to the top of the scroll content, but we do not need to do that to resize the scrollbar, we just have to call updateScrollbarAndSetupProperties

This will allow recalculate and compute to properly reset the size of the scrollbar when items re-render (see the example I added)

Copy link
Contributor

@alexander-alvarez alexander-alvarez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, just a little change in the dependency and g2g 👍
Sorry for the delay over the holiday break

package.json Outdated
@@ -23,6 +23,7 @@
"ember-cli-babel": "^6.8.0",
"ember-cli-htmlbars": "^2.0.1",
"ember-component-inbound-actions": "^1.3.0",
"ember-composable-helpers": "^2.1.0",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be a dev dependency since it's only used by the dummy app & tests

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

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