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

[V4beta13] ion-infinite-scroll (ionInfinite) does not fire after disable then re-enable #15994

Closed
ghenry22 opened this issue Oct 18, 2018 · 1 comment · Fixed by #16107
Closed
Assignees

Comments

@ghenry22
Copy link

Bug Report

Ionic Info
Run ionic info from a terminal/cmd prompt and paste the output below.

Ionic:

   ionic (Ionic CLI)             : 4.2.1 (/usr/local/lib/node_modules/ionic)
   Ionic Framework               : @ionic/angular 4.0.0-beta.13
   @angular-devkit/build-angular : 0.7.5
   @angular-devkit/schematics    : 0.7.5
   @angular/cli                  : 6.1.5
   @ionic/angular-toolkit        : not installed

System:

   NodeJS : v8.11.3 (/usr/local/bin/node)
   npm    : 6.4.1
   OS     : macOS

Describe the Bug
When using ion-infinite-scroll
On the last call to ionInfinite(event)
set event.target.disabled = true
as there is no more data

Data set changes so there is now more data
use ViewChild to get a reference to InfiniteScroll in TS
set this.infiniteScroll.disabled = false
The value is correctly set
I see the "fetching new data" come up in the view as expected
ionInfinite event never fires so new data is never loaded.

Seems like when set the disabled subscriptions to observable are removed but they are not recreated when set back to enabled again.

Steps to Reproduce
Steps to reproduce the behavior:
follow the example code in the ionic v4 docs for angular infinitescroll.
have an initial dataset, scroll until the last item is added and disable infinitescroll
add some more data to the dataset (or completely replace the dataset)
use ViewChild to access InfiniteScroll from TS (again just as per the docs example)
set this.infiniteScroll.disabled = false;
Scroll down until infinite scroll triggers
see the loading content displays correctly
see that ionInfinite event never fires

Related Code
Just follow the example in the v4 docs

Expected Behavior
when set to ionfinitescroll disabled = false ionInfinite lifecycle event fires as expected

@ionitron-bot
Copy link

ionitron-bot bot commented Nov 25, 2018

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.

@ionitron-bot ionitron-bot bot locked and limited conversation to collaborators Nov 25, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants