You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
feat: IonInfiniteScroll should expose a method to trigger threshold check #18653
/items/subscribed contains a list of items which are subscribed by the user. /items/all contains a list of all items (subscribed and not subscribed). It can be seen as a childpage of /items/subscribed, because it is routerLinked with push direction from there. /items/details/:id is the detail page where the subscription state of an item can be toggled.
The lists both have an ion-infinite-scroll at the end. It loads batches of 30 items.
My Problem:
I'm on the /items/subscribed page and scroll down, so the infinite scroll is triggered and I have 60 items. I scroll more, so I can't see any item of the first 30 ones. Now I navigate to the /items/all page and subscribe to a new item. When I do this, I refetch the list of subscribed items, but only the first 30. When I now navigate back to /items/subscribed, the list only contains this 30 items, so the list is fully scrolled to the end, but the ionInfinite-Event doesn't trigger now. I have to scroll up above the threshold and then scroll down again to trigger it.
Describe Preferred Solution
I would like to call something like this.ionInfiniteScroll.triggerCheck() in my ionViewDidEnter hook, which checks if the ionInfinite-Event should trigger.
Describe Alternatives
An alternative would be to check this automatically. But I think that's not really possible or is bad for performance reasons.
Additional Information
I also noticed, that the ionInfinite-Event sometimes doesn't trigger when I'm scrolling really really fast and reaching the end while another ionInfinite-Event is in progress. Maybe the check should also be triggered again, when the complete callback is called.
I could always call my fetchMore function on ionViewDidEnter, but that's not what I want. I only want to do that if the list is scrolled into the threshold area.
The problem you were running into was the same as #18071. I was able to fix this issue in #28569, so scrolling after going back should trigger the infinite scroll event even if you are still scrolled within the threshold. Since the root issue is fixed, I am going to close this. This fix is available in Ionic 7.6.0+. Let me know if you have any questions.
Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.
Activity
positlabs commentedon Jul 1, 2019
Can't you emit that event yourself?
RafaelKr commentedon Jul 1, 2019
I could always call my fetchMore function on ionViewDidEnter, but that's not what I want. I only want to do that if the list is scrolled into the threshold area.
liamdebeasi commentedon Dec 14, 2023
Hey there,
The problem you were running into was the same as #18071. I was able to fix this issue in #28569, so scrolling after going back should trigger the infinite scroll event even if you are still scrolled within the threshold. Since the root issue is fixed, I am going to close this. This fix is available in Ionic 7.6.0+. Let me know if you have any questions.
ionitron-bot commentedon Jan 13, 2024
Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.