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

Expression changed after it was checked error in NbTabset when conditional tabs included #322

Closed
1 of 2 tasks
Tibing opened this issue Mar 26, 2018 · 0 comments
Closed
1 of 2 tasks

Comments

@Tibing
Copy link
Member

Tibing commented Mar 26, 2018

Issue type

I'm submitting a ... (check one with "x")

  • bug report
  • feature request

Issue description

Current behavior:
NbTabComponent throws ERROR Error: ExpressionChangedAfterItHasBeenCheckedError: Expression has changed after it was checked. Previous value: 'content-active: false'. Current value: 'content-active: true'.
When renders conditionally with *ngIf directive.

Expected behavior:
Don't throw this error.

Related code:
Please, open browser console.
https://stackblitz.com/edit/angular-5xa2q9

As I understand correctly, this exception appeared because of NbTabsetComponent changes its child NbTabComponent property active after the NbTabComponent is updated its UI.

This issue doesn't appear when we don't use *ngIf because of standard change detection flow and in time of changing active property of NbTabComponent its UI isn't rendered yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants