Components: Mat-sort-table first arrow column is not working properly inside modal

Created on 24 Jul 2019  路  12Comments  路  Source: angular/components

Reproduction

Use StackBlitz to reproduce your issue:

https://stackblitz.com/edit/angular-dluque

Steps to reproduce:

  1. Open modal
  2. Move the mouse hover column-header
  3. See the difference between first, and other columns

Expected Behavior

What behavior were you expecting to see?
Arrow trigger works fine and as the same as all other columns

Actual Behavior

What behavior did you actually see?
The arrow is not showed

Environment

  • Angular: 8.1.2
  • CDK/Material: 8.1.2
  • Browser(s): Chrome
  • Operating System (e.g. Windows, macOS, Ubuntu): Windows

Most helpful comment

Using the cdkFocusInitial directive does fix the issue.

Here's the forked Stackblitz.

Here's the gist of it:

 <table
   class="mat-elevation-z8"
   mat-table
   matSort
+  cdkFocusInitial
   [dataSource]="dataSource">

All 12 comments

any updates?

Guys, anything??

updates?

Any updates? same here, when using dialog the first column header sorting arrow is not showing.

Any updates? same here, when using dialog the first column header sorting arrow is not showing.

i think that we will never know the answer =D

I'm seeing this behavior in a mat-expansion-panel as well. Any updates?

@jackmparker . Guys. You can solve it if you change initial focus in mat dialog. Use cdkFocusInitial.

Use cdkFocusInitia

how ?

Using the cdkFocusInitial directive does fix the issue.

Here's the forked Stackblitz.

Here's the gist of it:

 <table
   class="mat-elevation-z8"
   mat-table
   matSort
+  cdkFocusInitial
   [dataSource]="dataSource">

@ccjmne that works. Thank you so much!

@ccjmne works fine to me! Thanks!

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

constantinlucian picture constantinlucian  路  3Comments

Miiekeee picture Miiekeee  路  3Comments

RoxKilly picture RoxKilly  路  3Comments

vitaly-t picture vitaly-t  路  3Comments

theunreal picture theunreal  路  3Comments