Sonataadminbundle: Sorting in collection type is not working

Created on 19 Nov 2018  路  4Comments  路  Source: sonata-project/SonataAdminBundle

Environment

Packages

symfony/framework-bundle                 v4.1.7
sonata-project/admin-bundle              3.40.3
sonata-project/core-bundle               3.11.2

Subject

I try to make a sortable collection type with example in following list, but drag and drop sorting is not working. Sortable field "position" comes as a text input.

https://symfony.com/doc/master/bundles/SonataAdminBundle/reference/form_types.html#sonata-corebundle-form-type-collectiontype

$formMapper
    // ...
    ->add(
        'discounts',
        \Sonata\CoreBundle\Form\Type\CollectionType::class,
        [
            'btn_catalogue' => 'messages',
            'btn_add' => 'Add Discount',
        ],
        [
            'edit' => 'inline',
            'inline' => 'table',
            'sortable' => 'position',
        ]
    )
    // ...

Screenshot:
screen shot 2018-11-19 at 16 22 27

bug pending author stale unconfirmed

Most helpful comment

Hello. Is there a method to fix this?

All 4 comments

IIRC I had the same issue some time ago, make sure all javascript is loaded

All javascript files are seems loaded. No any 404 error in browser console.

Here is the loaded asset files:
screen shot 2018-11-19 at 16 27 07

Hello. Is there a method to fix this?

Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

Was this page helpful?
0 / 5 - 0 ratings