Skip to content

Commit 42985ce

Browse files
crisbetovictoriaaa234
authored andcommitted
fix(sort): arrow visible while parent row is being animated (#11827)
1 parent 8bddff0 commit 42985ce

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

src/lib/sort/sort-animations.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,11 @@ export const matSortAnimations: {
5454
arrowOpacity: trigger('arrowOpacity', [
5555
state('desc-to-active, asc-to-active, active', style({opacity: 1})),
5656
state('desc-to-hint, asc-to-hint, hint', style({opacity: .54})),
57-
state('hint-to-desc, active-to-desc, desc, hint-to-asc, active-to-asc, asc',
57+
state('hint-to-desc, active-to-desc, desc, hint-to-asc, active-to-asc, asc, void',
5858
style({opacity: 0})),
5959
// Transition between all states except for immediate transitions
60-
transition('* => asc, * => desc, * => active, * => hint', animate('0ms')),
61-
transition('* <=> *', animate(SORT_ANIMATION_TRANSITION))
60+
transition('* => asc, * => desc, * => active, * => hint, * => void', animate('0ms')),
61+
transition('* <=> *', animate(SORT_ANIMATION_TRANSITION)),
6262
]),
6363

6464
/**

src/lib/sort/sort-header.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,10 @@ $mat-sort-header-arrow-hint-opacity: 0.38;
3838
position: relative;
3939
display: flex;
4040

41+
// Start off at 0 since the arrow may become visible while parent are animating.
42+
// This will be overwritten when the arrow animations kick in. See #11819.
43+
opacity: 0;
44+
4145
&,
4246
[dir='rtl'] .mat-sort-header-position-before & {
4347
margin: 0 0 0 $mat-sort-header-arrow-margin;

0 commit comments

Comments
 (0)