Skip to content

Angular Material Table (mat-sort-header + expandable rows) #11990

Closed
@Bradenb25

Description

@Bradenb25

Bug, feature request, or proposal:

Bug

What is the expected behavior?

When creating expandable rows ie (https://stackblitz.com/edit/angular-material-expandable-table-rows) they should only open when clicked. In addition when you add a mat-sort-header and click a header to sort they should not open up.

What is the current behavior?

I created an angular material table with expandable rows and added mat-sort-header to the columns. When I click on a column it sorts, but when it finishes sorting some of the rows are open. In the repro none of the rows are opened, however you can see the affect it is having in mine. Once you filter by the heading you have to click on a row multiple times to get it to open(similar to mine, but with mine it is actually open) I added a console.log so that you can see what the show value is.

What are the steps to reproduce?

https://stackblitz.com/edit/angular-material2-issue-a8kjon

Is there anything else we should know?

I'm pretty sure it is a problem with the when predicate. It doesn't get run correctly when you sort on the header.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions