carbon-components-angular
carbon-components-angular copied to clipboard
[Tab Component Exception]: Tab throws ExpressionChangedAfterItHasBeenCheckedError when using a boolean to conditionally render the tab
[Tab Component Exception]: Tab throws ExpressionChangedAfterItHasBeenCheckedError when using a boolean to conditionally render the tab
Describe in detail the issue you're having.
Using any boolean to conditionally render an <ibm-tab>
component results in exception.
<ibm-tab
*ngIf="true"
id="container-install-tab"
[disabled]="true"
[heading]="'container-install-tab-header' | translate"
>
<app-container-install></app-container-install>
</ibm-tab>
it still works, but exceptions in the console are no bueno..
Is this a feature request (new component, new icon), a bug, or a general issue?
Bug
Is this issue related to a specific component?
Tab component
What did you expect to happen? What happened instead? What would you like to see changed?
I would like it to not throw an exception when using a boolean to render the tab.
What browser are you working in?
Chrome
What version of the Carbon Design System are you using?
"carbon-components": "^10.16.0",
"carbon-components-angular": "4.40.0",
"@carbon/ibmdotcom-web-components": "^1.4.1",
"@carbon/icons-angular": "^11.1.4",
"@carbon/themes": "^10.15.0",
What offering/product do you work on? Any pressing ship or release dates we should be aware of?
SDMA Next Gen. Upcoming deployment July 22.
Steps to reproduce the issue
Additional information
Seems like if I removed
type="container"
[followFocus]="true"
[isNavigation]="false"
[cacheActive]="true"
and
id="hey-now"
the exception stopped in Codesandbox. I tried in my local and did not have the same luck unfortunately..
Aha! Did some more debugging today and it is the cacheActive
property. When set to false
no error is thrown.
Seeing the same issue. We're trying to implement lazy-loaded tabs.
Closing issue since solution is proposed 🤔 Feel free to comment and i can reopen if needed.