How to enable sorting Elements from IRRE column

27 views Asked by At

I want to make Items sortable from the IRRE Inline input but it keeps sorting the elements by the order they are viewed from the list module instead.

In my inventory I got

    'ctrl' => [
        'title' => 'Inventory',
        'label' => 'title',
        'sortby' => 'sorting',
    ],
    'columns' => [
        [...],
        'items' => [
            'label' => 'Items',
            'config' => [
                'type' => 'inline',
                'foreign_table' => 'tx_vendorgame_domain_model_items',
                'foreign_sortby' => 'sorting',
                'appearance' => [
                    'useSortable' => true,
                ],
            ],
        ],
    ],

My items TCA:

    'ctrl' => [
        'title' => 'Items',
        'label' => 'title',
        'sortby' => 'sorting',
    ],

What am I doing wrong?

EDIT The inventory's items column got the sorting in the IRRE correct but I cant figure out how to use this list for the order in the display.

1

There are 1 answers

0
Starzi On

I did find it out.

In my inventory i forgot to use foreign_field and symmetric_sortby

        'items' => [
            'label' => 'Items',
            'config' => [
                'type' => 'inline',
                'foreign_table' => 'tx_vendorgame_domain_model_items',
                'foreign_field' => 'inventory',
                'symmetric_sortby' => 'items',
                'foreign_sortby' => 'sorting',