Skip to content

Commit

Permalink
fix(sort): arrow visible while parent row is being animated (#11827)
Browse files Browse the repository at this point in the history
  • Loading branch information
crisbeto authored and josephperrott committed Jun 29, 2018
1 parent 6b1f703 commit de13ec9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/lib/sort/sort-animations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,11 @@ export const matSortAnimations: {
arrowOpacity: trigger('arrowOpacity', [
state('desc-to-active, asc-to-active, active', style({opacity: 1})),
state('desc-to-hint, asc-to-hint, hint', style({opacity: .54})),
state('hint-to-desc, active-to-desc, desc, hint-to-asc, active-to-asc, asc',
state('hint-to-desc, active-to-desc, desc, hint-to-asc, active-to-asc, asc, void',
style({opacity: 0})),
// Transition between all states except for immediate transitions
transition('* => asc, * => desc, * => active, * => hint', animate('0ms')),
transition('* <=> *', animate(SORT_ANIMATION_TRANSITION))
transition('* => asc, * => desc, * => active, * => hint, * => void', animate('0ms')),
transition('* <=> *', animate(SORT_ANIMATION_TRANSITION)),
]),

/**
Expand Down
4 changes: 4 additions & 0 deletions src/lib/sort/sort-header.scss
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ $mat-sort-header-arrow-hint-opacity: 0.38;
position: relative;
display: flex;

// Start off at 0 since the arrow may become visible while parent are animating.
// This will be overwritten when the arrow animations kick in. See #11819.
opacity: 0;

&,
[dir='rtl'] .mat-sort-header-position-before & {
margin: 0 0 0 $mat-sort-header-arrow-margin;
Expand Down

0 comments on commit de13ec9

Please sign in to comment.