[SM-403] fix: manually detectChanges in Product Switcher (#4307)
This commit is contained in:
parent
b1ee65dca8
commit
288827f13a
|
@ -1,4 +1,4 @@
|
|||
import { Component, Input } from "@angular/core";
|
||||
import { AfterViewInit, ChangeDetectorRef, Component, Input } from "@angular/core";
|
||||
|
||||
import { IconButtonType } from "@bitwarden/components/src/icon-button/icon-button.component";
|
||||
|
||||
|
@ -8,7 +8,7 @@ import { flagEnabled } from "../../../utils/flags";
|
|||
selector: "product-switcher",
|
||||
templateUrl: "./product-switcher.component.html",
|
||||
})
|
||||
export class ProductSwitcherComponent {
|
||||
export class ProductSwitcherComponent implements AfterViewInit {
|
||||
protected isEnabled = flagEnabled("secretsManager");
|
||||
|
||||
/**
|
||||
|
@ -16,4 +16,15 @@ export class ProductSwitcherComponent {
|
|||
*/
|
||||
@Input()
|
||||
buttonType: IconButtonType = "main";
|
||||
|
||||
ngAfterViewInit() {
|
||||
/**
|
||||
* Resolves https://angular.io/errors/NG0100 [SM-403]
|
||||
*
|
||||
* Caused by `[bitMenuTriggerFor]="content?.menu"` in template
|
||||
*/
|
||||
this.changeDetector.detectChanges();
|
||||
}
|
||||
|
||||
constructor(private changeDetector: ChangeDetectorRef) {}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue