Skip to content

[Sort] Animations not playing correctly #9939

@nickwinger

Description

@nickwinger

Bug:

When setting the initial sort with the Method sort on MatSort, the arrow is not shown, it's opactiy
is 0

What is the expected behavior?

The arrow should be visible when setting the initial sorted column with the method sort on MatSort

What is the current behavior?

The opacity of the arrow remains 0 although the column is set to sorted

What are the steps to reproduce?

Providing a StackBlitz reproduction is the best way to share your issue.

StackBlitz starter: https://goo.gl/wwnhMV

Create a Component with a mat-table and mat-sort (with changeDetection PUSH)
Get the MatSort via ViewChild and set the default sorted column in ngOnInit with the method sort

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

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

Angular 5.2.4
Angular Material 5.2.0
Windows 10
Typescript 2.6.2
Chrome Browser 64

Is there anything else we should know?

It has already worked... (some Version ago)

Metadata

Metadata

Assignees

Labels

P2The issue is important to a large percentage of users, with a workaround

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions