Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do you animate table rows using ng-animate in the same way as one would list items?

It's quite simple to smoothly animate lists using angular's ng-animate, but tables seem to be another story.

Plunker list

Plunker table

The table move animations don't work, the items just snap into place, I suppose some other CSS/JS is required for the table, but I'm not sure what would work, I tried a lot of things with no success.

I'm sure it's possible, for example there's this jQuery table animation

But how does this translate to angular animate? Do I have to delve into some JS/jQuery DOM manipulation through a directive or is there another way?

Either way, I'd like to see an elegant way to do this in angular.

like image 782
Kesarion Avatar asked Apr 08 '14 15:04

Kesarion


People also ask

How do you animate each row of a table in Powerpoint?

Press and hold the Ctrl key while you select the parts of the table that you want to animate. On the Animations tab, in the Advanced Animations group, click Add Animation to open the menu of animation options: To make the shapes enter with an effect, point to Entrance, and then click an effect.

Which of the following are valid easing functions in angular animations?

The easing value controls how the animation accelerates and decelerates during its runtime. Value is one of ease , ease-in , ease-out , ease-in-out , or a cubic-bezier() function call. If not supplied, no easing is applied.


1 Answers

The problem is that the height of the rows remains constant (until they are removed). In order for the height of the rows to become animatable you need to apply to them: display: block;

.animate-repeat: {
    ...
    display: block;
}

See, also, this short demo.

like image 134
gkalpak Avatar answered Oct 21 '22 03:10

gkalpak