Open themao opened 8 years ago
Noticed that too, when the start position is not 0, you get an odd behavior when sorting. (Elements move where they shouldn't)
I've noticed another strange behavior of this bundle: it uses counter that starts from 0, while SonataAdminBundle's javascript, which is used by 'sonata_type_collection' (admin that's embedded inside another admin) starts counting from 1. In the end it makes collisions: items are ordered like 1,2,3 - so the top position is never reached.
I've made a workaround for this in my current project, but I think it would be handy to provide a generic solution: make a config parameter like 'counter_start' which will be an integer and will indicate where to start counting from.
What do you think about this extension?
Can you please explain what you exactly did to make it work?
Sonata admin officially migrated to runroom-packages/sortable-behavior-bundle
, try it instead.
https://symfony.com/bundles/SonataAdminBundle/current/cookbook/recipe_sortable_listing.html
I've noticed another strange behavior of this bundle: it uses counter that starts from 0, while SonataAdminBundle's javascript, which is used by 'sonata_type_collection' (admin that's embedded inside another admin) starts counting from 1. In the end it makes collisions: items are ordered like 1,2,3 - so the top position is never reached.
I've made a workaround for this in my current project, but I think it would be handy to provide a generic solution: make a config parameter like 'counter_start' which will be an integer and will indicate where to start counting from.
What do you think about this extension?