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

Tabs endless loading loop issue #4639

Closed
seanbotha123 opened this issue May 18, 2017 · 6 comments
Closed

Tabs endless loading loop issue #4639

seanbotha123 opened this issue May 18, 2017 · 6 comments
Assignees
Labels
P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent

Comments

@seanbotha123
Copy link

seanbotha123 commented May 18, 2017

Bug, feature request, or proposal:

Bug

What is the expected behavior?

Change tabs very quickly, each tab has large amounts of data to process. When switching between tabs too quickly the tabs go into an endless loop of loading.

What is the current behavior?

Goes into endless loading loop.

What are the steps to reproduce?

http://plnkr.co/edit/O85thWJeQ0stFAOtojBR

  • open Plunker.
  • run.
  • click 'Click Me' button/ switch between tabs rapidly.
  • loop.

I need to have a ngIf on my components to remove them from the DOM if the tab is not selected. Found the issue where a user was switching tabs quickly and the previous tabs were still loading.

Edit: I see this even happens when not using ngIf. http://plnkr.co/edit/bu2iWvGifGHs95JswBzL

@jelbourn jelbourn added the P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent label May 18, 2017
@jelbourn
Copy link
Member

@andrewseguin looked at the plunker, definitely something weird going on

@seanbotha123
Copy link
Author

Hi guys,

Any feedback here yet?

@james-schwartzkopf
Copy link

james-schwartzkopf commented Jul 26, 2017

I believe we are seeing the same issue. In our case were are trying to store the active tab in ngrx/store. Things work as expected as long as you switch tabs slowly, but if you change quickly it seems to get stuck in a loop.

It looks like the issue is multiple events piling up in the queue for the async selectChange event emitter?

Edit: I have found I can work around the issue by adding this check at the front of my selectIndexChange event handler: if (this.tabGroup.selectedIndex !== tabIndex) { return; }

@jelbourn jelbourn assigned amcdnl and unassigned andrewseguin Aug 7, 2017
@amcdnl
Copy link
Contributor

amcdnl commented Aug 26, 2017

Here is a updated plunker - http://plnkr.co/edit/UTgPtgPIKuHScfQKpVFp?p=preview

amcdnl added a commit to amcdnl/material2 that referenced this issue Aug 27, 2017
amcdnl added a commit to amcdnl/material2 that referenced this issue Aug 27, 2017
@finalxcode
Copy link

mark

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 7, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent
Projects
None yet
Development

No branches or pull requests

6 participants