mat-expansion-panel keeps contents of collapsed panels in DOM
- 主要言語
- TypeScript
- スター
- 25k
- フォーク
- 6.8k
- 平均マージ
- 1日 8時間
- マージ済み PR(30日)
- 91
説明
I found this while debugging rendering performance in my app. I have a large section that initially renders as a big mat-expansion-panel with all panels collapsed, except one. Here is a screenshot of mat-expansion-panel demo that sxhibits the same behavior:

I believe that the contents of the collapsed sections should be removed from the DOM to not slow down the application by rendering content that isn't currently visible.
If the reason for doing that was animations, then the animations probably need fixing - Angular supports keeping things in DOM while they are animating. Or maybe this was used, but the animation end never gets registered? I'm gussing :) In any case I believe it's a bug.
CC @jelbourn
Possilbly related (?): https://github.com/angular/components/issues/8287
コントリビューションガイド
調査の方向性
まず、issue に示されている mat-expansion-panel のデモで、複数のパネルが折りたたまれ、1 つが展開されている状態の動作を再現します。mat-expansion-panel の実装とそのアニメーションの動作を追跡します。折りたたまれたパネルのコンテンツが、トランジションを壊すことなく DOM から削除されれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- angular, typescript
- 領域
- frontend
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 45/100