You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
However, the view does not update on shown. Even though the event is fired, and the observable emits, the entire containing view does not update at all. The hidden event works as intended.
I have checked the current code and realized that the NgbPopover.close() marks for change detection after the hidden event is fired, but the NgbPopover.open() does not. Code:
I have manually tried adding the this._changeDetector.markForCheck(), but the view still does not update. Only explicitly adding this._changeDetector.detectChanges() fixes the issue.
It is even stranger that not only the directive content, but also the entire parent component view does not update (in the StackBlitz, the description bottom text does not change either). This occurs in OnPush and Default change detection strategies, even with animations disabled.
Link to minimally-working StackBlitz that reproduces the issue:
Bug description:
This is a regression bug of 8.0.0 release.
I have a subject that fires on each
shown
/hidden
event, and is merged to an observable to update a count:However, the view does not update on
shown
. Even though the event is fired, and the observable emits, the entire containing view does not update at all. Thehidden
event works as intended.I have checked the current code and realized that the
NgbPopover.close()
marks for change detection after thehidden
event is fired, but theNgbPopover.open()
does not. Code:ng-bootstrap/src/popover/popover.ts
Line 258 in 1f466ed
ng-bootstrap/src/popover/popover.ts
Lines 267 to 276 in 1f466ed
I have manually tried adding the
this._changeDetector.markForCheck()
, but the view still does not update. Only explicitly addingthis._changeDetector.detectChanges()
fixes the issue.It is even stranger that not only the directive content, but also the entire parent component view does not update (in the StackBlitz, the description bottom text does not change either). This occurs in OnPush and Default change detection strategies, even with animations disabled.
Link to minimally-working StackBlitz that reproduces the issue:
https://stackblitz.com/edit/angular-vsfpjy
Versions of Angular, ng-bootstrap and Bootstrap:
Angular: 10.2.3
ng-bootstrap: 8.0.0
Bootstrap: 4.5.3
The text was updated successfully, but these errors were encountered: