angular / angular/components

Material Tabs with lazy loading rendering duplicate content

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

描述

#### Bug, feature request, or proposal:
Material tabs (with `matTabContent`) are rendering multiple instances of the tab body inside the same tab when switching away and back too fast.

#### What is the expected behavior?
Not seeing duplicate content.

#### What is the current behavior?
There are multiple instances of the same body/content inside.

#### What are the steps to reproduce?
https://stackblitz.com/edit/angular-material2-issue-jwxe85
Switch back and forth quickly on these tabs and pay attention to what happens to the one in the middle. You will notice content being rendered multiple times.

#### What is the use-case or motivation for changing an existing behavior?

#### Which versions of Angular, Material, OS, TypeScript, browsers are affected?

#### Is there anything else we should know?

贡献指南

打开贡献指南

调研方向

从链接的 StackBlitz 复现开始,使用 matTabContent 快速切换 Material 标签页,以观察重复的内容。跟踪标签页切换涉及的 lazy-loading 行为,然后验证快速切换离开并返回后,每个标签页的内容只留下一个实例。

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

评估

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

把新 issue 发到你的邮箱

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