Skip to content

[MatTable], [MatSort] Sorting stops work if table has *ngIf attribute #15008

@vadjs

Description

@vadjs

What is the expected behavior?

Sorting should work correct.

What is the current behavior?

<table *ngIf='true' mat-table [dataSource]="dataSource" matSort>

*ngIf makes sorting not work.

What are the steps to reproduce?

https://stackblitz.com/edit/angular-sn7pfz?file=app/table-sorting-example.html

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

Angular = 7.2.2
Material = 7.3.0
OS = ALL
TypeScript = ALL

Is there anything else we should know?

Metadata

Metadata

Assignees

No one assigned

    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