menu: trigger ExpressionChangedAfterItHasBeenCheckedError aria-expanded: null in OnPush component
- 主要语言
- TypeScript
- 星标
- 25k
- 派生
- 6.8k
- 平均合并
- 1 天 8 小时
- 30 天内合并 PR
- 91
描述
#### What is the expected behavior?
Error should not occur
#### What is the current behavior?
Repeatedly and quickly clicking on menu trigger button causes error
#### What are the steps to reproduce?
[StackBlitz](https://stackblitz.com/edit/angular-stgyux)
Click on menuTrigger repeatedly -> error shows in console
#### Which versions of Angular, Material, OS, TypeScript, browsers are affected?
Angular 7.1.0
Angular Material 7.1.0
Chrome Browser
#### Is there anything else we should know?
ChangeDetection: OnPush
ERROR
Error: ExpressionChangedAfterItHasBeenCheckedError: Expression has changed after it was checked. Previous value: 'aria-expanded: true'. Current value: 'aria-expanded: null'.
贡献指南
调研方向
从链接的 StackBlitz 复现开始,使用 Angular 和 Angular Material 7.1.0,然后在观察控制台的同时,反复点击 OnPush 组件中的菜单触发器。跟踪菜单触发器的 aria-expanded 变化,并确定为什么已检查的值会变为 null;当复现不再报告 ExpressionChangedAfterItHasBeenCheckedError 时即表示完成。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- angular, typescript
- 领域
- frontend
- Issue 类型
- 缺陷
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 38/100