@@ -20,7 +20,8 @@ import {
2020 state ,
2121 style ,
2222 animate ,
23- transition
23+ transition ,
24+ keyframes ,
2425} from '@angular/animations' ;
2526import { CdkColumnDef } from '@angular/cdk/table' ;
2627import { Subscription } from 'rxjs/Subscription' ;
@@ -70,6 +71,24 @@ const SORT_ANIMATION_TRANSITION =
7071 state ( 'asc' , style ( { transform : 'rotate(45deg)' } ) ) ,
7172 state ( 'desc' , style ( { transform : 'rotate(-45deg)' } ) ) ,
7273 transition ( 'asc <=> desc' , animate ( SORT_ANIMATION_TRANSITION ) )
74+ ] ) ,
75+ trigger ( 'indicatorToggle' , [
76+ transition ( 'void => asc' , animate ( SORT_ANIMATION_TRANSITION , keyframes ( [
77+ style ( { transform : 'translateY(25%)' , opacity : 0 } ) ,
78+ style ( { transform : 'none' , opacity : 1 } )
79+ ] ) ) ) ,
80+ transition ( 'asc => void' , animate ( SORT_ANIMATION_TRANSITION , keyframes ( [
81+ style ( { transform : 'none' , opacity : 1 } ) ,
82+ style ( { transform : 'translateY(-25%)' , opacity : 0 } )
83+ ] ) ) ) ,
84+ transition ( 'void => desc' , animate ( SORT_ANIMATION_TRANSITION , keyframes ( [
85+ style ( { transform : 'translateY(-25%)' , opacity : 0 } ) ,
86+ style ( { transform : 'none' , opacity : 1 } )
87+ ] ) ) ) ,
88+ transition ( 'desc => void' , animate ( SORT_ANIMATION_TRANSITION , keyframes ( [
89+ style ( { transform : 'none' , opacity : 1 } ) ,
90+ style ( { transform : 'translateY(25%)' , opacity : 0 } )
91+ ] ) ) ) ,
7392 ] )
7493 ]
7594} )
0 commit comments