Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Starting count for position #39

Open
themao opened this issue Nov 16, 2015 · 3 comments
Open

Starting count for position #39

themao opened this issue Nov 16, 2015 · 3 comments

Comments

@themao
Copy link
Contributor

themao commented Nov 16, 2015

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?

@Tofandel
Copy link
Contributor

Tofandel commented Jun 12, 2017

Noticed that too, when the start position is not 0, you get an odd behavior when sorting. (Elements move where they shouldn't)

@tonyellow
Copy link

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?

@dmitryuk
Copy link

Sonata admin officially migrated to runroom-packages/sortable-behavior-bundle, try it instead.
https://symfony.com/bundles/SonataAdminBundle/current/cookbook/recipe_sortable_listing.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants