Is this a regression?
The previous version in which this bug was not present was
No response
Description
Reproduction
|
[class.mat-menu-panel-animating]="_isAnimating" |
|
protected _onAnimationDone(state: string) { |
|
const isExit = state === EXIT_ANIMATION; |
|
|
|
if (isExit || state === ENTER_ANIMATION) { |
|
if (isExit) { |
|
clearTimeout(this._exitFallbackTimeout); |
|
this._exitFallbackTimeout = undefined; |
|
} |
|
this._animationDone.next(isExit ? 'void' : 'enter'); |
|
this._isAnimating = false; |
|
} |
|
} |
|
|
|
protected _onAnimationStart(state: string) { |
|
if (state === ENTER_ANIMATION || state === EXIT_ANIMATION) { |
|
this._isAnimating = true; |
|
} |
|
} |
Expected Behavior
_isAnimating should probably be a signal (since it's used in the template), or _changeDetectorRef would need to be notified to avoid the console warning.
Actual Behavior
NG0100: ExpressionChangedAfterItHasBeenCheckedError: Expression has changed after it was checked.
Previous value for 'mat-menu-panel-animating': 'true'. Current value: 'false'.
Expression location: _MatMenu component.
Environment
- Angular:
20.3.2 (latest)
- CDK/Material:
20.2.5 (latest)
- Browser(s): Chrome 140
- app.config.ts
providers include:
provideCheckNoChangesConfig({ interval: 1000, exhaustive: true }), // For debugging zoneless locally https://angular.dev/guide/zoneless#debug-mode-check-to-ensure-updates-are-detected.