Ocotobercms V4 Default ordering

hi,

i have in config_list.yaml

showSorting: true
defaultSort:
    column: sort_order
    direction: desc

this is not working so i have this in controller

 public function listExtendQuery($query, $def = null)
    {
      $query->orderBy('sort_order', 'desc'); // enforce higher → lower
    }

This works however when i tried to reorder the row by sortable trait then thesorting is reversed. like the 57 become 1 and so on.

there is no custom code that is interfering with this.

someone having the same issue or it is just me and if there is a possible solution.

Hey,

I think you need to call ->reorder() first to reset the order. Keep in mind this will completely ignore the user preference for sorting if you do that.

@daft Unfortunately it is not working.

problem is that it is reversing the order. so if we have DESC in the query for rendering the list it wont work. ASC will work.

so in the end the Sortable is reversing the order. I am sure from top to bottom but ignoring the DESC.

is there anythingwe can do about this?