angular / angular/components

Expansion panel expanded state issue with Virtual Scroll

Offen
#13,697 15 Kommentare 16 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
area: cdk/scrolling area: material/expansion P3
Vorherrschende Sprache
TypeScript
Sterne
25k
Forks
6.8k
Ø Merge
1 T. 8 Std.
Gemergte PRs (30 T.)
91

Beschreibung

#### Bug, feature request, or proposal:

`cdkVirtualScroll` does not work properly with `matAccordion` and `matExpansionPanel`.

The accordion does not respect the expansion state of individual expansion panels as you scroll.

#### What is the expected behavior?
The expansion state is maintained as you scroll

#### What is the current behavior?
If you expand the xth item in the accordion then as you scroll, the xth in the view will always be expanded. ie if you expand the 3rd item then as you scroll down to say the 1000th item then the 1003rd item will be expanded.

#### What are the steps to reproduce?
[Stackblitz example](https://stackblitz.com/edit/virtual-scroll-expansion-panels)

#### What is the use-case or motivation for changing an existing behavior?
Able to use expansion panels inside virtual scroll

#### Which versions of Angular, Material, OS, TypeScript, browsers are affected?
Angular 7.0
Material 7.0
MacOS 10.14
TypeScript 3.x
Browser Chrome 70.0

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

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

Beginne mit der verknüpften StackBlitz-Reproduktion und untersuche, wie cdkVirtualScroll mit matAccordion und matExpansionPanel kombiniert wird. Bestätige, dass der Erweiterungsstatus dem ursprünglichen Element und nicht seiner wiederverwendeten Viewport-Position folgt, und verwende dieses Verhalten als Abschlusskriterium.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
angular, typescript
Bereich
frontend
Issue-Typ
Bug
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
38/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.