-
-
Notifications
You must be signed in to change notification settings - Fork 131
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
loadMoreAction fires prematurely #82
Comments
Inneresting. I think catering for every use case is outside of the scope of this library. However I think maybe we should make this hook public, so that people who want to control how this check works can easily override it. @daniel-de-wit would u be down to submit a PR to make this public, and document your use case in the README? |
Thanks for your reply, I was on vacation so didn't see your message.. I believe there must be a proper way we can detect if the component is on screen. There are some jQuery plugins that work with nested scrollable divs, I think. Maybe I can extract a good solution for every use case since we just want it to fire when visible to the user on screen. I definitely like your idea of making the hook public. It might take me a little while to fix this as I have never actually commited something to an open-source project. But I will try to do it :) Thanks again for making this wonderfull addon 👍 |
I wonder if we can use this somehow? On Tue, 1 Sep 2015 at 15:50 Daniel de Wit notifications@github.com wrote:
|
Sorry i mean this: https://github.com/dockyard/ember-in-viewport |
Yeah! We totally can... wanna have a go at it? I can help with the OSS stuff 👍 |
Yes sounds like a fun challenge ;) I wonder if the ember-in-viewport supports nested scrollable divs. I'll go fiddle with it. |
awesome @daniel-de-wit !!! |
Totally awesome, I noticed the premature loading behaviour as well but
this way the user never gets to see the loading message.
If this is implemented, we should also look into supporting an offset in
order to maintain such behaviour.
|
pretty sure ember-in-viewport supports offsets out of the box 👍 |
jah it does
|
Cool :). 2015-09-01 16:16 GMT+02:00 Hugh Francis notifications@github.com:
|
I also was having an issue where the loading component was not triggering the
|
We're not scrolling the window (which is the default behavior), manually specifying a scrollable just loads everything, and rolling our own with ember-in-viewport doesn't work in Ember 2.9 for now. I'll just leave this half-baked branch here. Maybe we can add a button to manually load more until the dust settles? Maybe we should just fully roll our own? And reminder: "total pages" in ember-infinity seems to actually mean "total records". adopted-ember-addons/ember-infinity#97 adopted-ember-addons/ember-infinity#82 (comment) DockYard/ember-in-viewport#95
In my app I have many scrollable divs nested. This causes the
loadMoreAction
to fire prematurely from the component. Even when defining thescrollable
attribute on the component.I lack experience to really test en provide a working solution for everyone. By changing the way the offset is calculated when
position
is other thanrelative
fixed my issue.For relative ( original ):
For fixed / absolute:
ember-infinity/addon/components/infinity-loader.js
Original:
Edited ( works for me ):
The text was updated successfully, but these errors were encountered: