Skip to content
This repository has been archived by the owner on Apr 12, 2024. It is now read-only.

ngRepeat does not trigger move animation #15068

Open
pondermatic opened this issue Aug 30, 2016 · 1 comment
Open

ngRepeat does not trigger move animation #15068

pondermatic opened this issue Aug 30, 2016 · 1 comment

Comments

@pondermatic
Copy link

Overview of the Issue
There appears to be a bug with ngRepeat and move animations.

What is the current behavior?
When an item is inserted or deleted, the move animation is not triggered for the items after the inserted or deleted item.

Steps to reproduce:
Go to http://plnkr.co/edit/MPpxQUc8OyrRAgDgmDLp?p=preview
Click on an Insert button or Remove text.

What is the expected behavior?
The move animation should be triggered for the items after the inserted or deleted items.

Versions
Angular: 1.2.30, 1.3.20, 1.4.12, 1.5.8, snapshot
Browser: Chrome 52
OS: Windows 10

What is the motivation / use case for changing the behavior?
I would like to add an animated border or background color change to items that are added to, deleted from or have moved in a list. The documentation for ngRepeat's move animation says:

when an adjacent item is filtered out causing a reorder or when the item contents are reordered

Possible related issue
#5160

I have implemented a fix for this issue and will be submitting a pull request today.
Here is a plunker with the revised Angular code.
http://plnkr.co/edit/ru77WOctvnEinWdTBMMQ?p=preview

pondermatic added a commit to pondermatic/angular.js that referenced this issue Aug 30, 2016
ngRepeat does not trigger a move animation for items that come after inserted or deleted items. The documentation says that a move animation occurs "when an adjacent item is filtered out causing a reorder or when the item contents are reordered". With this fix, items that are moved can use an animation, such as changing the border or background color, to show a change.

This will fix issue angular#15068.
@gkalpak
Copy link
Member

gkalpak commented Sep 7, 2016

Possibly related to #14984 as well.

@gkalpak gkalpak added this to the Backlog milestone Sep 8, 2016
@petebacondarwin petebacondarwin modified the milestones: Backlog, Backlog2 Oct 17, 2016
@Narretz Narretz modified the milestones: 1.6.x, Backlog, 1.6.4 Mar 8, 2017
@Narretz Narretz self-assigned this Mar 16, 2017
Narretz pushed a commit to Narretz/angular.js that referenced this issue Mar 16, 2017
ngRepeat does not trigger a move animation for items that come after inserted or deleted items. The documentation says that a move animation occurs "when an adjacent item is filtered out causing a reorder or when the item contents are reordered". With this fix, items that are moved can use an animation, such as changing the border or background color, to show a change.

This will fix issue angular#15068.
@Narretz Narretz modified the milestones: 1.6.4, 1.6.5 Mar 31, 2017
@Narretz Narretz removed this from the 1.6.5 milestone Apr 19, 2017
@Narretz Narretz modified the milestones: 1.6.x, 1.6.5 Apr 19, 2017
@Narretz Narretz modified the milestones: 1.6.x, 1.7.x Apr 12, 2018
@Narretz Narretz modified the milestones: 1.7.x - won't fix, 1.7.x Oct 3, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants