angular / angular/components

bug(table): ngOnDestroy clears view before route animations finish

未关闭
#8,057 27 条评论 24 个 reaction 已指派 0 人 在 GitHub 查看
area: material/table P4
主要语言
TypeScript
星标
25k
派生
6.8k
平均合并
1 天 8 小时
30 天内合并 PR
91

描述

#### Reproduction

https://angular-components-8057.stackblitz.io (updated to 9.2.4)

Steps to reproduce:
1. Navigate to "Page" and the table view is destroyed immediately.

#### Expected Behavior

Table should remain in DOM until animations finish.

#### Actual Behavior

Table is removed from DOM as soon as routing begins.

#### Environment

- Angular: 9.1.9
- CDK/Material: 9.2.4
- Browser(s): Google Chrome
- Operating System (e.g. Windows, macOS, Ubuntu): macOS

贡献指南

打开贡献指南

调研方向

从链接的 StackBlitz 复现开始,跟踪路由开始时发生的情况,重点关注为什么表格视图会在路由动画完成之前被销毁。完成的标准是表格在动画结束前一直保留在 DOM 中,并且复现不再显示立即移除。

由索引模型根据 Issue 内容生成。

评估

技术栈
angular, typescript
领域
frontend
Issue 类型
缺陷
难度
4/5
预计耗时
3-5 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
30/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。