joshwcomeau / react-flip-move

Effortless animation between DOM changes (eg. list reordering) using the FLIP technique.
http://joshwcomeau.github.io/react-flip-move/examples
MIT License
4.09k stars 258 forks source link

Function onFinishAll is never called #209

Closed Tsourdox closed 6 years ago

Tsourdox commented 6 years ago

This is how I'm using it.

<FlipMove className="ui horizontal list" duration={300} onStartAll={this.onStartAll} onFinishAll={this.onFinishAll}>
   {this.items}
<FlipMove>

[onStart, onStartAll, onFinish] works as expected. Using version 2.9.1

joshwcomeau commented 6 years ago

Hm, sorry about that! Thanks for the heads-up!

Don't have a ton of time on my hands for this ATM, PRs welcome!

tobilen commented 6 years ago

i'll take a look at it at the end of the week. might also use it to do some dom cleanup, which hopefully prevents some more edge cases with nodes not being removed

tobilen commented 6 years ago

tested this in chrome/ff/ie11 with v2.10.1 as well as 2.9.1 . handler is being invoked correctly.

@Tsourdox if the problem persists, im going to need a reproducable code snippet (for example a codesandbox)

Tsourdox commented 6 years ago

I believe I tested it in Safari but I'll se if I can test it again and se if the issue was on my behalf.

tobilen commented 6 years ago

safari (11) works as well: image

Tsourdox commented 6 years ago

Tested it and it doesn't fire in any browser. I'm using FlipMove together with react-dnd but even if I remove that code the problem persists. I'll try and update to the latest version and se if that changes anything. At the moment I don't need the event so I'm good for now. Thx for looking in to it!

tobilen commented 6 years ago

Ok then, closing this issue. It could be a problem with another library stopping propagation of events, but i'm just speculating here. If you manage to reproduce the problem, just reopen it.