ninsuo / symfony-collection-demo

Demo website for https://github.com/ninsuo/symfony-collection
MIT License
15 stars 8 forks source link

Demo page incorrect behavior #10

Open verschoof opened 6 years ago

verschoof commented 6 years ago

Hi,

I don't know if the demo page is up-to-date but;

https://symfony-collection.fuz.org/symfony3/

Default start: Apple Banana Orange

Duplicate Banana and delete the new banana. (the bottom one)

Expected: I expected I can move the banana to the top

Seeing: I cannot move the banana to the top

screen shot 2018-05-08 at 07 54 14
ninsuo commented 6 years ago

Hi @verschoof,

Thank you for your message, indeed, there's an issue.

I think it's because of fade_in and fade_out options (which are a nightmare to manage in the code, I should refactor that somehow), just disable them to bypass it.

Cheers

verschoof commented 6 years ago

I also noticed that the "up" and "down" buttons also fading. maybe just grab the parent an fade that and remove it after :)

To review the code, that's in an other repository right?

ninsuo commented 6 years ago

The problem is the number of elements when removing / adding one:

When fade out is enabled, element removal is delayed because of the animation, but code is executed asynchronously and thus element counts are buggy.

About the code, yep it's in https://github.com/ninsuo/symfony-collection