Components: Table with expandable rows breaks when a matSort is added

Created on 13 Jul 2018  路  3Comments  路  Source: angular/components

Bug, feature request, or proposal:

Take the "Table with expandable rows" from the example docs for Table, and add a basic matSort. After sorting by a column, some rows will no longer expand when clicked.

What is the expected behavior?

The rows should continue to continue to expand normally.

What is the current behavior?

After sorting, some rows will not expand when clicked, and the behavior is quite inconsistent.

What are the steps to reproduce?

https://stackblitz.com/edit/angular-kavsfy
Click the name header to sort by name. The first 5 rows, as well as the 8th row (Neon) will no longer expand when clicked. After being clicked once, if a different row is successfully expanded, then any rows that had initially failed to expand will go back to working.

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

Tested on Angular 6.0.9, Angular Material 6.3.3, Chrome.

Is there anything else we should know?

Seems to be a different issue from #11990, but may be related.

Most helpful comment

Closing as this is being caused by the animations that are in place for detailExpand.

Because the element is being added and removed and the void state is not being accounted for the element was gettings stuck in a state where it had both the collapsed and expanded state stylings applied.

Here is a fork of your repro that includes the void state and works as expected.

All 3 comments

Closing as this is being caused by the animations that are in place for detailExpand.

Because the element is being added and removed and the void state is not being accounted for the element was gettings stuck in a state where it had both the collapsed and expanded state stylings applied.

Here is a fork of your repro that includes the void state and works as expected.

expandrows with sort and pagination is not working as expected.
the expanded row is displaying by default without clicking on the expand row.
here is the sample where the implementation done.
https://stackblitz.com/edit/angular-pd5fnz

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

_This action has been performed automatically by a bot._

Was this page helpful?
0 / 5 - 0 ratings

Related issues

kara picture kara  路  3Comments

alanpurple picture alanpurple  路  3Comments

jelbourn picture jelbourn  路  3Comments

crutchcorn picture crutchcorn  路  3Comments

constantinlucian picture constantinlucian  路  3Comments