Skip to content

bug(accordion): reordering confuses expansion state of the panels #6446

@princemaple

Description

@princemaple

Bug, feature request, or proposal:

Bug

What is the expected behavior?

Reordering of the panels does not affect the expansion status of the panels

What is the current behavior?

It does cause some wrong behavior

What are the steps to reproduce?

http://plnkr.co/edit/F6AunHYXOfxGKID5oYV3?p=preview

image

  1. expand item 1, which is at the top and has active: false
    image

  2. toggle active, so it becomes active: true and falls down the list
    image

  3. expand item 2, which is now at the top, it will become the expanded one in the accordion, but it won't really show the expanded content
    image

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

When I want to sort items by some status of them, I expect to be able to do so without running into bugs :)

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

NG 4.3.2, MD2 beta8

If I close the panel and reopen it, everything will be fine again
Not really, item 3 is also affected, somehow.

Am I not supposed to reorder accordion items, though?

Metadata

Metadata

Assignees

Labels

P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgent

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions