Feasible to clean up removed DOM elements for re-insertion?
Current behaviour appears to presume removed elements will be discarded.
The animation is broken when I re-append a previously removed element. I’m guessing because it is being inserted with the style properties AutoAnimate left on it when it was removed?
A simple demonstration:
https://gregarious-maroon-iguanacolossus.glitch.me
Glitch source: https://glitch.com/edit/#!/gregarious-maroon-iguanacolossus
Is it feasible to remove the applied “exit styles” once the animation is complete (upon removal from the DOM)? This would enable animations in scenarios such as this where interaction is applied as a progressive enhancement.
One work around I am considering is creating a disposable wrapper element that is recreated upon remove/insert.
This seams reasonable to me. Thanks for the suggestion.
This is resolved with changes made in https://github.com/formkit/auto-animate/releases/tag/0.8.0
Ah, that's true actually.